Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Programming_Fundamentals.Methods.Methods_Exersice;
- import java.util.Scanner;
- public class E01SmallestOfThreeNumbers {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int a = Integer.parseInt(sc.nextLine());
- int b = Integer.parseInt(sc.nextLine());
- int c = Integer.parseInt(sc.nextLine());
- smallestOf3(a, b, c);
- }
- private static void smallestOf3(int a, int b, int c) {
- System.out.println(Math.min(a, Math.min(b, c)));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment