John_IV

Untitled

Oct 12th, 2019
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. package Programming_Fundamentals.Methods.Methods_Exersice;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class E01SmallestOfThreeNumbers {
  6. public static void main(String[] args) {
  7. Scanner sc = new Scanner(System.in);
  8. int a = Integer.parseInt(sc.nextLine());
  9. int b = Integer.parseInt(sc.nextLine());
  10. int c = Integer.parseInt(sc.nextLine());
  11.  
  12. smallestOf3(a, b, c);
  13. }
  14.  
  15. private static void smallestOf3(int a, int b, int c) {
  16.  
  17. System.out.println(Math.min(a, Math.min(b, c)));
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment