#include <iostream.h>
#include <conio.h>
main(){
int bil1,bil2,pil;
float hsl;
cout<<"ini merupakan progam kalkulator sederhana"<<endl;
cout<<"pilih salah satu :"<<endl;
cout<<"1. Operasi Penjumlahan"<<endl;
cout<<"2. Operasi Pengurangan"<<endl;
cout<<"3. Operasi Pembagian"<<endl;
cout<<"4. Operasi Perkalian"<<endl;
cout<<"nah, sekarang masukkan pilihan anda : ";
cin>>pil;
switch (pil)
{ case 1:
cout<<"bil 1 = ";
cin>>bil1;
cout<<"bil 2 = ";
cin>>bil2;
hsl=bil1+bil2;
cout<<"Hasil = "<<hsl<<endl<<endl;
break;
case 2:
cout<<"bil 1 = ";
cin>>bil1;
cout<<"bil 2 = ";
cin>>bil2;
hsl=bil1-bil2;
cout<<"Hasil = "<<hsl<<endl<<endl;
break;
case 3:
cout<<"bil 1 = ";
cin>>bil1;
cout<<"bil 2 = ";
cin>>bil2;
hsl=bil1/bil2;
cout<<"Hasil = "<<hsl<<endl<<endl;
break;
case 4:
cout<<"bil 1 = ";
cin>>bil1;
cout<<"bil 2 = ";
cin>>bil2;
hsl=bil1*bil2;
cout<<"Hasil = "<<hsl<<endl<<endl;
break;
}
getch();
}