write a program that input of two number and print the larger of them
Answers
Answered by
1
Answer:
import java.util.*;
class ab
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
int a,b;
System.out.println("Enter the number");
a=in.nextInt();
b=in.nextInt();
if(a>b)
System.out.println("The largest is="+a);
else
System.out.println("The largest is="+b);
}
}
Similar questions