Advertisement
evelin4ik003

Untitled

Mar 31st, 2020
586
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. package cool;
  2. import java.util.Scanner;
  3. public class wool {
  4. public static void main(String[] args) {
  5. //круг по радиусу
  6. Scanner scan = new Scanner(System.in);
  7. System.out.println("Введите радиус");
  8. double cm = scan.nextDouble();
  9. System.out.println("Окружность равна "+cm*6.28 );
  10.  
  11.  
  12. //секунды в нормальное время
  13. Scanner scan = new Scanner(System.in);
  14. System.out.println("Введите секунды");
  15. int sec = scan.nextInt();
  16. int hours = sec/3600;
  17. int minutes = (sec-hours*3600)/60;
  18. int seconds = sec-hours*3600-minutes*60;
  19. System.out.println(hours+";"+minutes+";"+seconds );
  20.  
  21. }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement