Advertisement
Guest User

Untitled

a guest
Jan 25th, 2015
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. import java.text.DecimalFormat;
  2. import java.util.Locale;
  3. import java.util.Scanner;
  4.  
  5.  
  6. public class _04_TheSmallestOfThreeNumbers {
  7. public static void main(String[] args) {
  8.  
  9. Locale.setDefault(Locale.ROOT);
  10. DecimalFormat format = new DecimalFormat();
  11. format.setDecimalSeparatorAlwaysShown(false);
  12.  
  13. @SuppressWarnings("resource")
  14. Scanner str = new Scanner(System.in);
  15. double a = str.nextDouble();
  16. double b = str.nextDouble();
  17. double c = str.nextDouble();
  18. double smallest = Math.min(a, Math.min(b, c));
  19. System.out.printf(format.format(smallest));
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement