write a program to input three integer a,b and c print the greatest amongst them with supporting message
Answers
Answered by
1
Answer:
import java.util.Scanner ;
public class main
{
public static void main()
{
Scanner sc = new Scanner(System.in) ;
sop("“Enter 3 numbers") ;
int a = sc.nextInt() ;
int b = sc.nextInt() ;
int c = sc.nextInt() ;
System.out.println("The greatest number is " + Math.max(Math.max(a,b),c)) ;
}
}
Explanation:
Easy
Similar questions