Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream.h>
- #include<conio.h>
- #include<cstring.h>
- struct peg
- {
- char NIK[10];
- char nama[30];
- char Jnskelamin[8];
- char tmptlahir[20];
- char tgllahir[8];
- char golongan[5];
- };
- void main()
- {
- clrscr();
- peg dtpeg;
- cout<<"NIK :";
- cin>>dtpeg.NIK;
- cout<<"Nama :";
- cin>>dtpeg.nama;
- cout<<"Jns kelamin :";
- cin>>dtpeg.Jnskelamin;
- cout<<"tmpt lahir :";
- cin>>dtpeg.tmptlahir;
- cout<<"tgl lahir :";
- cin>>dtpeg.tgllahir;
- cout<<"golongan :";
- cin>>dtpeg.golongan;
- if(dtpeg.golongan=="IIA")
- cout<<"1.700.000";
- else if(dtpeg.golongan=="IIB")
- cout<<"1.850.000";
- else if(dtpeg.golongan=="IIC")
- cout<<"1.950.000";
- else if(dtpeg.golongan=="IIIA")
- cout<<"2.100.000";
- else if(dtpeg.golongan=="IIIB")
- cout<<"2.300.000";
- else if(dtpeg.golongan=="IIIC")
- cout<<"2.500.000";
- else if(dtpeg.golongan=="IIID")
- cout<<"2.700.000";
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement