write a program to accept two numbers and display the greatest of the two using simple IF statement only
Answers
Answered by
0
Answer:
class Solution{
public ststic void main(String[] args){
Scanner in=new Scanner(System.in);
int n1=in.nextInt();
int n2=in.nextInt();
if(n1>n2)
System.out.println(n1);
else
System.out.println(n1);
in.close();
}
}
Similar questions