Computer Science, asked by beantkaurluthra2762, 1 month ago

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 HarshRana9194
0

Answer:

I have more information about this question

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