Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class TaskClocks
- {
- public static void main(String[] args)
- {
- Scanner sc = new Scanner(System.in);
- double deg = 0.0;
- int res = 0;
- int h, m, s;
- System.out.print("Введите кол-во часов (0 - 23): ");
- h = sc.nextInt();
- System.out.println();
- System.out.print("Введите кол-во минут (0 - 59): ");
- m = sc.nextInt();
- System.out.println();
- System.out.print("Введите кол-во секунд (0 - 59): ");
- s = sc.nextInt();
- System.out.println();
- deg = (h * 15) + (m * 0.25) + (s * 0.0041);
- System.out.println(deg + " deg");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment