Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class main {
- public static void main(String[] args) {
- Scanner Scanner = new Scanner(System.in);
- double a = Scanner.nextDouble();
- double b = Scanner.nextDouble();
- double c = Scanner.nextDouble();
- if(a > b && a > c) {
- if(a % 1 == 0){
- System.out.printf("%.0f", a);}
- System.out.println(a);}
- else if (b >a && b> c) {
- if(b % 1 == 0)
- { System.out.printf("%.0f");}
- System.out.println(b);}
- else {
- if(c % 1 == 0){
- System.out.printf("%.0f");}
- System.out.println(c);}
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement