import java.util.Scanner;
public class input {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner (System.in);
System.out.println("menu");
System.out.println("1. Luas Persegi");
System.out.println("2. Luas Segitiga");
System.out.println("3. Luas Lingkaran");
System.out.print("Pilihan Anda");
int pilih = in.nextInt();
if (pilih==1){
System.out.print("Panjang Sisi = ");
int sisi = in.nextInt();
System.out.print("Hasil = "+sisi*sisi);
}
else if (pilih==2){
System.out.println("Alas = ");
int alas = in.nextInt();
System.out.print("Tinggi = ");
int tinggi = in.nextInt();
System.out.print("Hasil = "+alas*tinggi*0.5);
}
else if (pilih==3){
System.out.println("Jari - jari = ");
int jari = in.nextInt();
System.out.print("Hasil = "+jari*jari*3.14);
}
}
}
public class input {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner (System.in);
System.out.println("menu");
System.out.println("1. Luas Persegi");
System.out.println("2. Luas Segitiga");
System.out.println("3. Luas Lingkaran");
System.out.print("Pilihan Anda");
int pilih = in.nextInt();
if (pilih==1){
System.out.print("Panjang Sisi = ");
int sisi = in.nextInt();
System.out.print("Hasil = "+sisi*sisi);
}
else if (pilih==2){
System.out.println("Alas = ");
int alas = in.nextInt();
System.out.print("Tinggi = ");
int tinggi = in.nextInt();
System.out.print("Hasil = "+alas*tinggi*0.5);
}
else if (pilih==3){
System.out.println("Jari - jari = ");
int jari = in.nextInt();
System.out.print("Hasil = "+jari*jari*3.14);
}
}
}