write a program in java to store two numbers and print the largest number
Answers
Answered by
0
Here is your answer
Explanation:
import java.util.Scanner;
public class JavaProgram
{
public static void main(String args[])
{
int a, b, big;
Scanner scan = new Scanner(System.in);
System.out.print("Enter Two Number : ");
a = scan.nextInt();
b = scan.nextInt();
if(a>b)
{
big = a;
}
else
{
big = b;
}
System.out.print("Largest of Two Number is " +big);
}
}
Similar questions