Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Day06C {
- public static void main(String[] args) {
- Scanner uInput = new Scanner(System.in);
- int num1, num2;
- System.out.print("Enter num1: ");
- num1 = uInput.nextInt();
- System.out.print("Enter num2: ");
- num2 = uInput.nextInt();
- uInput.close();
- // add and else if for when both number is the same
- if (num1 > num2) {
- System.out.println(num1 + " is larger");
- } else {
- System.out.println(num2 + " is larger");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment