Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javaSyntaxix;
- import java.util.Scanner;
- public class SmallestOfThree {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- double first = Double.parseDouble(sc.next());
- double second = Double.parseDouble(sc.next());
- double third = Double.parseDouble(sc.next());
- double smallest = Math.min(first, Math.min(second, third));
- System.out.println(smallest);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement