public class Persegi {
String P;
String L;
public static void main(String[] args) {
Persegi a = new Persegi();
Persegi b = new Persegi();
Persegi c = new Persegi();
Persegi d = new Persegi();
Persegi e = new Persegi();
int P1=6, P2=12, P3=18, P4=8, P5=10;
int L1=6, L2=12, L3=18, L4=8, L5=10;
System.out.println("Panjang = "+P1+"\nLebar = "+L1+"\nP x L = "+P1*L1);
System.out.println("Panjang = "+P2+"\nLebar = "+L2+"\nP x L = "+P2*L2);
System.out.println("Panjang = "+P3+"\nLebar = "+L3+"\nP x L = "+P3*L3);
System.out.println("Panjang = "+P4+"\nLebar = "+L4+"\nP x L = "+P4*L4);
System.out.println("Panjang = "+P5+"\nLebar = "+L5+"\nP x L = "+P5*L5);
}
}
Output Program:
0 komentar:
Posting Komentar