Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/App.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
import java.util.Scanner;

public class App {
public static void main(String[] args) throws Exception {
System.out.println("Hello, World!");
Scanner input = new Scanner(System.in);
System.out.println("Enter two integer numbers:");
int num1 = input.nextInt();
int num2 = input.nextInt();

if (num1 > num2) {
System.out.println("The first number is the greatest number:" + num1);

} else if (num1 < num2) {
System.out.println("The second number is the greatest number:" + num2);

} else {
System.out.println("The first number " + num1 + " is equal to the second number " + num2);
}
}
}