Good one type it dont copy paste. By typing you will know sum of the portions of java.
import java.io.*;
class LargestNumber
{
public static void main(String args[])
{
int a=0,b=0,c=0;
System.out.println(" Enter the 3 no's : ");
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
try
{
a=Integer.parseInt(br.readLine());
b=Integer.parseInt(br.readLine());
c=Integer.parseInt(br.readLine());
}catch(Exception e){}
if(a>b && a>c)
System.out.print(" The Largest Number is : "+a);
else if(b>a && b>c)
System.out.print(" The Largest Number is : "+b);
else
System.out.print(" The Largest Number is : "+c);
}
}
Loading...
|
Comments :
Post a Comment