Computer Science, asked by anmol284, 11 months ago

write a program that input of two number and print the larger of them​

Answers

Answered by anand997875
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