Advertisement
coasterka

#2SmallestOfThreeNums

May 13th, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. import java.util.Locale;
  2. import java.util.Scanner;
  3.  
  4. public class SmallestOfThreeNums {
  5.     public static void main(String[] args) {
  6.         Scanner scan = new Scanner(System.in);
  7.         Locale.setDefault(Locale.ROOT);
  8.         double firstNum = scan.nextDouble();
  9.         double secondNum = scan.nextDouble();
  10.         double thirdNum = scan.nextDouble();
  11.         double tempMin = Math.min(firstNum, secondNum);
  12.         double smallest = Math.min(tempMin, thirdNum);
  13.         System.out.println(smallest);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement