forked from Denisolt/CSCI-160
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReview1.java
More file actions
25 lines (21 loc) · 765 Bytes
/
Review1.java
File metadata and controls
25 lines (21 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import java.util.Scanner;
public class Review1
{
public static void main(String [] arg)
{
Scanner keyboard = new Scanner(System.in);
System.out.print("Enter the first number: ");
int inputVal = keyboard.nextInt();
Scanner keyboard2 = new Scanner(System.in);
System.out.print("Enter the second number: ");
int inputVal2 = keyboard2.nextInt();
while(inputVal!=inputVal2)
{System.out.println("Numbers are different");
System.out.print("Enter the first number: ");
inputVal = keyboard.nextInt();
System.out.print("Enter the second number: ");
inputVal2 = keyboard2.nextInt();
}
System.out.println("numbers are the same");
}
}