#include <iostream.h>
#include <conio.h>
#include <math.h>
int main()
{
char yes;
yes='y';
while(yes=='y')
{
cout<<"**********************************************************************"<<endl;
int a,manager,karyawan;
int gm = 200000,gk=100000;
int angka;
cout<<"1.gaji manager"<<endl;
cout<<"2.gaji karyawan"<<endl;
cout<<"3.keluar"<<endl;
cout<<"masukkan pilihan anda = ";cin>>a;
cout<<"masukkan hari masuk anda = ";cin>>angka;
cout<<"**********************************************************************"<<endl;
switch(a)
{
case 1 :
manager=gm*angka;
cout<<"jumlah gaji manager =Rp. "<<manager<<endl;
break;
case 2:
karyawan=gk*angka;
cout<<"jumlah gaji karyawan =Rp. "<<endl;
cout<<karyawan<<endl;
break;
defalt:
goto exit;
}
exit:
cout<<"**********************************************************************"<<endl<<endl;
cout<<" tekan enter untuk halaman selanjutnya"<<endl;
getch();
clrscr();
cout<<"mau input data lagi ?"<<endl;
cout<<"tekan (y/t) untuk kembali ke awal : ";cin>>yes;
clrscr();
}
cout<<" thank you "<<endl;
getche();
}
0 comments:
Post a Comment