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
16 changes: 16 additions & 0 deletions task2.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import java.util.Scanner;
public class task2 {
public static void main(String[] args){
Scanner enter=new Scanner(System.in);
System.out.println("Enter the first number");
int first= enter.nextInt();
System.out.println("Enter the second number");
int second= enter.nextInt();
if(first>second)
System.out.println(first+" is grater than "+second );
else if(second>first)
System.out.println(second+" is grater than "+first );
else
System.out.println("The two numbers are equal");
}
}