Advertisement
adesuryadi_

Data Array Strucck Pegawai

Jul 16th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. #include<iostream.h>
  2. #include<conio.h>
  3. #include<cstring.h>
  4.  
  5. struct peg
  6.  
  7. {
  8. char NIK[10];
  9. char nama[30];
  10. char Jnskelamin[8];
  11. char tmptlahir[20];
  12. char tgllahir[8];
  13. char golongan[5];
  14.  
  15. };
  16.  
  17. void main()
  18.  
  19. {
  20. clrscr();
  21. peg dtpeg;
  22.  
  23. cout<<"NIK :";
  24. cin>>dtpeg.NIK;
  25. cout<<"Nama :";
  26. cin>>dtpeg.nama;
  27. cout<<"Jns kelamin :";
  28. cin>>dtpeg.Jnskelamin;
  29. cout<<"tmpt lahir :";
  30. cin>>dtpeg.tmptlahir;
  31. cout<<"tgl lahir :";
  32. cin>>dtpeg.tgllahir;
  33. cout<<"golongan :";
  34. cin>>dtpeg.golongan;
  35.  
  36. if(dtpeg.golongan=="IIA")
  37. cout<<"1.700.000";
  38. else if(dtpeg.golongan=="IIB")
  39. cout<<"1.850.000";
  40. else if(dtpeg.golongan=="IIC")
  41. cout<<"1.950.000";
  42. else if(dtpeg.golongan=="IIIA")
  43. cout<<"2.100.000";
  44. else if(dtpeg.golongan=="IIIB")
  45. cout<<"2.300.000";
  46. else if(dtpeg.golongan=="IIIC")
  47. cout<<"2.500.000";
  48. else if(dtpeg.golongan=="IIID")
  49. cout<<"2.700.000";
  50.  
  51. getch();
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement