import java.util.Scanner;
public class LargestAmongThree {
public static void bigThree(int a,int b,int c)
{
if((a>b)&&(a>c))
{
System.out.println(a+" is biggest");
}
else if((b>c)&&(b>a))
{
System.out.println(b+" is biggest");
}
else
System.out.println(c+" is biggest");
}
public static void main(String args[])
{
System.out.println("enter three integers");
Scanner in=new Scanner(System.in);
int i,j,k;
i=in.nextInt();
j=in.nextInt();
k=in.nextInt();
bigThree(i,j,k);
}
}
No comments:
Post a Comment
Please post your comments. Your comments make us to write more programs for you.