Advertisement
Deinio

Untitled

May 15th, 2022
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class main {
  4. public static void main(String[] args) {
  5. Scanner Scanner = new Scanner(System.in);
  6. double a = Scanner.nextDouble();
  7. double b = Scanner.nextDouble();
  8. double c = Scanner.nextDouble();
  9. if(a > b && a > c) {
  10. if(a % 1 == 0){
  11. System.out.printf("%.0f", a);}
  12. System.out.println(a);}
  13.  
  14. else if (b >a && b> c) {
  15. if(b % 1 == 0)
  16. { System.out.printf("%.0f");}
  17. System.out.println(b);}
  18. else {
  19. if(c % 1 == 0){
  20. System.out.printf("%.0f");}
  21. System.out.println(c);}
  22.  
  23. }}
  24.  
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement