daily pastebin goal
28%
SHARE
TWEET

BiggestOfThree

a guest Mar 26th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top