import jeliot.io.*;
public class maximum {
public void masuk(){
System.out.print("nilai a : ");
a=Input.readInt();
System.out.print("nilai b : ");
b=Input.readInt();
}
public void proses(){
max=a;
if(b>a) max=b;
if(a>b) max=a;
}
public void keluar(){
System.out.println("nilai maximum = "+max);
}
private int a,b,max;
public static void main() {
maximum zaki=new maximum();
x.masuk();
x.proses();
x.keluar();
}
}
public class maximum {
public void masuk(){
System.out.print("nilai a : ");
a=Input.readInt();
System.out.print("nilai b : ");
b=Input.readInt();
}
public void proses(){
max=a;
if(b>a) max=b;
if(a>b) max=a;
}
public void keluar(){
System.out.println("nilai maximum = "+max);
}
private int a,b,max;
public static void main() {
maximum zaki=new maximum();
x.masuk();
x.proses();
x.keluar();
}
}
0 komentar:
Posting Komentar