Computer Science, asked by gddhjutfzxh939, 1 month ago

write a program in java to store two numbers and print the largest number​

Answers

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