import java.io.*;
import java.util.*;
public class Large{
Scanner scan=new Scanner(System.in);
int a, b, c, large=0;
public void input()throws IOException{
System.out.println("Enter any three numbers: ");
a=scan.nextInt();
b=scan.nextInt();
c=scan.nextInt();
}
public void compute(){
if(a>b&&a>c)
large=a;
else if(b>a&&b>c)
large=b;
else
large=c;
}
public void display(){
System.out.println("Large number out of "+a+", "+b+", "+c+" is: "+large);
}
public static void main(String[] args)throws IOException{
Large obj=new Large();
obj.input();
obj.compute();
obj.display();
}
}
import java.util.*;
public class Large{
Scanner scan=new Scanner(System.in);
int a, b, c, large=0;
public void input()throws IOException{
System.out.println("Enter any three numbers: ");
a=scan.nextInt();
b=scan.nextInt();
c=scan.nextInt();
}
public void compute(){
if(a>b&&a>c)
large=a;
else if(b>a&&b>c)
large=b;
else
large=c;
}
public void display(){
System.out.println("Large number out of "+a+", "+b+", "+c+" is: "+large);
}
public static void main(String[] args)throws IOException{
Large obj=new Large();
obj.input();
obj.compute();
obj.display();
}
}
Comments