Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int centuries = Integer.parseInt(scanner.nextLine());
- double years = centuries * 100,
- days = years * 365.2422,
- hours = days * 24,
- minutes = hours * 60;
- System.out.printf("%d centuries = %.0f years = %.0f days = %.0f hours = %.0f minutes", centuries, years, days, hours, minutes);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement