Math, asked by afgq1a, 6 months ago

write a program that assigns three different integers and print the greatest of these.

Answers

Answered by harshita4910
4

Answer:

class greatest

{

public static void main(int n1, n2, n3)

{

if( n1 >= n2 && n1 >= n3)

System.out.println(n1+" is the greatest Number");

else if (n2 >= n1 && n2 >= n3)

System.out.println(n2+" is the greatest Number");

else

System.out.println(n3+" is the greatest Number");

}

}

hope it'll help u.........

Similar questions