public class diskon {
public static void main (String[] args) {
int harga = 30000;
double diskon = 0.2;
diskon = harga * diskon;
System.out.println(“diskon = “+diskon);
}
}

public class luasLingkaran {
public static void main (String[] args) {
double luas;
int r = 20;
double pi = 3.14;
luas = pi * (r * r);
System.out.println(“luas lingkaran = “+luas);
}
}

public class luasPersegipanjang {
public static void main (String[] args) {
double luas;
int panjang = 5;
int lebar = 3;
luas = panjang * lebar;
System.out.println(“luas persegi panjang = “+luas);
}
}

public class luasSegitiga {
public static void main (String[] args) {
double luas;
int alas = 10;
int tinggi = 12;
luas = alas * tinggi / 2;
System.out.println(“luas segitiga = “+luas);
}
}