Computer Science, asked by np916872, 5 months ago

W.A.P. to input three different numbers ‘a’,’b’,’c’ and display the greatest number among them.

Sample Input: 2, 7, 3

Sample Output: 7 is the greatest number among the three entered numbers.
give me Answer very fast......​

Answers

Answered by baskaranrani3
1

Answer:

2+4+6+6+8+10/2

Explanation:

36/2 18

Answered by keshavrawat2005
3

Answer:

import java.util.Scanner;

public class Q6

{

public static void main(String[] args)

{

Scanner sc = new Scanner(System.in);

System.out.println("Enter the value of a: ");

int a = sc.nextInt();

System.out.println("Enter the value of b: ");

int b = sc.nextInt();

System.out.println("Enter the value of c: ");

int c = sc.nextInt();

if( a >= b && a >= c)

System.out.println("The greatest: " + a);

else if (b >= a && b >= c)

System.out.println("The greatest: " + b);

else

System.out.println("The greatest: " + c);

} // method ends here

} // class ends here

Explanation:

I hope it will help you!

Similar questions