Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class SmallestOfTreeNumbers {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int a = sc.nextInt();
- int b = sc.nextInt();
- int c = sc.nextInt();
- PrintTheSmallestInteger(a, b, c);
- }
- public static void PrintTheSmallestInteger(int a, int b, int c) {
- if (a < b && a < c) {
- System.out.println(a);
- }
- if (b < a && b < c) {
- System.out.println(b);
- }
- if (c < a && c < b) {
- System.out.println(c);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement