Source Code :
public class MenghitungBujurSangkar {
String S;
public static void main(String[] args) {
BujurSangkar a = new BujurSangkar();
BujurSangkar b = new BujurSangkar();
BujurSangkar c = new BujurSangkar();
BujurSangkar d = new BujurSangkar();
BujurSangkar e = new BujurSangkar();
int S1=5, S2=12, S3=6, S4=24, S5=10;
System.out.println("Sisi1 = "+S1+"\nSisi2 = "+S1+"\nSisi x Sisi = "+S1*S1);
System.out.println("Sisi1 = "+S2+"\nSisi2 = "+S2+"\nSisi x Sisi = "+S2*S2);
System.out.println("Sisi1 = "+S3+"\nSisi2 = "+S3+"\nSisi x Sisi = "+S3*S3);
System.out.println("Sisi1 = "+S4+"\nSisi2 = "+S4+"\nSisi x Sisi = "+S4*S4);
System.out.println("Sisi1 = "+S5+"\nSisi2 = "+S5+"\nSisi x Sisi = "+S5*S5);
}
}
0 komentar:
Posting Komentar