write a java program using if else statement to find the greater number
Answers
Answered by
0
Explanation:
Java program to find largest among 2 numbers
import java.util.scanner;
class number
{
public static void main;
{
int a, b, biggest;
Scanner sc = new Scanner (System.in);
a = sc . nextInt( );
b = sc. nextInt( );
if (a>b)
{
biggest = a;
}
else
{
biggest = b;
}
system.out.println(" largest among two numbers is " +biggest);
}
}
Similar questions
English,
3 months ago
Environmental Sciences,
3 months ago
Math,
3 months ago
Math,
6 months ago
English,
11 months ago
Computer Science,
11 months ago
Math,
11 months ago