#include <iostream.h>
#include <conio.h>
#include <math.h>
int main()
{
int a,gaji,total,kel;
cout<<"1. total "<<endl;
cout<<"2. jumlah hari "<<endl;
cout<<"3. keluar "<<endl;
cout<<"masukkan pilihan anda = ";cin>>a;
cout<<"masukkan gaji = ";cin>>gaji;
switch(a)
{
case 1 :
total=pow(gaji,2);
cout<<"maka totalnya = "<<total;
break;
case 2 :
kel= 4*gaji;
cout<<"maka jumlah hari = "<<kel;
break;
default:
goto exit;
}
exit:
getch();
}
0 comments:
Post a Comment