write a program to enter three number and print greatest number
Answers
Answered by
1
Answer:
import java.util.*;
public class solution
{
public static void main(String[]args)
{
Scanner sc=new Scanner(System.in);
int a=0,b=0,c=0;
System.out.println("Enter the numbers");
a=sc.nextInt();
b=sc.nextInt();
c=sc.nextInt();
int max1=Math.max(a,b);
int maxans=Math.max(c,max1);
System.out.println(maxans);
Explanation:
Similar questions