Advertisement
Guest User

BiggestOfThreeFirstSolution

a guest
Dec 19th, 2018
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Telerik {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.  
  8.         double first = Double.parseDouble(scanner.nextLine());
  9.         double second = Double.parseDouble(scanner.nextLine());
  10.         double third = Double.parseDouble(scanner.nextLine());
  11.  
  12.         double result = Double.MIN_NORMAL;
  13.         if (first >= second && first >= third) {
  14.             result = first;
  15.         } else if (second >= first && second >= third) {
  16.             result = second;
  17.         } else if (third >= first && third >= second) {
  18.             result = third;
  19.         }
  20.         System.out.printf("%.0f", result);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement