import
java.io.*;
class
largest
{
int a,b,c,large;
void read()throws IOException
{
BufferedReader br=new
BufferedReader( new InputStreamReader(System.in));
System.out.println("Enter
3 numbers");
a=Integer.parseInt(br.readLine());
b=Integer.parseInt(br.readLine());
c=Integer.parseInt(br.readLine());
}
void check()
{ if(a>b & a>c)
large=a;
else if(b>c)
large=b;
else
large=c;
System.out.println("The largest number
is "+large);
}
public static void main(String s[])throws
IOException
{ largest
n=new largest();
n.read();
n.check();
}
}
Output
|
This blog is mainly developed for individuals,who were interested in programming using C,C++,java and SQL.
No comments:
Post a Comment