Advertisement
Guest User

BiggestOfThree

a guest
Mar 26th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class BiggestOfThree {
  3.     public static void main(String[] args) {
  4.         Scanner input = new Scanner(System.in);
  5.  
  6.         double first = input.nextDouble();
  7.         double second = input.nextDouble();
  8.         double third = input.nextDouble();
  9.  
  10.         if (first > second && first > third) {
  11.             System.out.println(first);
  12.         } else if (second > first && second > third){
  13.             System.out.println(second);
  14.         } else {
  15.             System.out.println(third);
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement