#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
float bil1,bil2,bil3,hasil;
int pilih;
cout<<"MASUKKAN PILIHAN (1/2/3/4) : ";
cin>>pilih;
switch(pilih){
case 1 :
cout<<"BIL 1 : ";cin>>bil1;
cout<<"BIL 2 : ";cin>>bil2;
cout<<"BIL 3 : ";cin>>bil3;
hasil=bil1+bil2+bil3;
cout<<"HASIL JUMLAH : "<<hasil<<endl;
break;
case 2 :
cout<<"BIL 1 : ";cin>>bil1;
cout<<"BIL 2 : ";cin>>bil2;
cout<<"BIL 3 : ";cin>>bil3;
hasil=bil1-bil2-bil3;
cout<<"HASIL KURANG : "<<hasil<<endl;
break;
case 3 :
cout<<"BIL 1 : ";cin>>bil1;
cout<<"BIL 2 : ";cin>>bil2;
cout<<"BIL 3 : ";cin>>bil3;
hasil=bil1*bil2*bil3;
cout<<"HASIL KALI : "<<hasil<<endl;
break;
case 4 :
cout<<"BIL 1 : ";cin>>bil1;
cout<<"BIL 2 : ";cin>>bil2;
cout<<"BIL 3 : ";cin>>bil3;
hasil=bil1/bil2/bil3;
cout<<"HASIL BAGI : "<<hasil<<endl;
break;
default :
cout<<"PILIHAN TIDAK ADA";
break;
}
getch();
}
maka hasilnya :
Terimakasih,silahkan coment apabila programnya error,dan selamat mencoba..!!!!