Computer Science, asked by vicky6934, 9 months ago

wap to input two numbers and check which number is greater

Answers

Answered by anannya69
1

Answer:

import java.util.*;

public class max

{

static void main()

{

int a,b;

System.out.println("ENTER THE TWO NUMBERS");

a=sc.nextInt();

b=sc.nextInt();

if(a>b)

{

System.out.println("first one is the greatest");

}

else if(b>a)

{

System.out.println("second number is the greatest");

}

else

{

System.out.println("numbers are equal");

}

}

}

Similar questions