Advertisement
Guest User

SmallestOfThree

a guest
May 11th, 2014
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. package javaSyntaxix;
  2. import java.util.Scanner;
  3.  
  4. public class SmallestOfThree {
  5.  
  6.     public static void main(String[] args) {
  7.         Scanner sc = new Scanner(System.in);
  8.         double first = Double.parseDouble(sc.next());
  9.         double second = Double.parseDouble(sc.next());
  10.         double third = Double.parseDouble(sc.next());
  11.         double smallest = Math.min(first, Math.min(second, third));
  12.         System.out.println(smallest);
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement