Input:
Three space separated integers.
Output:
Maximum integer value
SAMPLE INPUT
8 6 1
SAMPLE OUTPUT
8
Explanation
Out of given numbers, 8 is maximum.
Solution-
Solution-
import java.util.Scanner;
class Number{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
if(a>b && a>c)
{
System.out.println(a);
}
if(b>a && b>c)
{
System.out.println(b);
}
if(c>a && c>b)
{
System.out.println(c);
}
}
}
Post a Comment