Write a program to take two numbers form the user and print the greater number, if both the
numbers are equal print "The numbers are equal".
Answers
Answered by
0
Answer:
I have more information about this question
Answered by
0
Answer:
import java.util.Scanner;
class xyz
{
public static void main (String args[])
{
Scanner in=new Scanner(System.in);
System.out.println("Enter the numbers");
int a=in.nextInt();
int b=in.nextInt();
if(a==b)
System.out.println("The numbers are equal");
else
System.out.println("The greater number is : "+Math.max(a,b));
}
}
//your answer ;)
Similar questions
Math,
15 days ago
India Languages,
15 days ago
Science,
1 month ago
Computer Science,
1 month ago
Math,
9 months ago
English,
9 months ago