TUGAS E
#include
#include
#include
#include
char *nm(char nip[9])
{
if(!strcmp(nip,"13540121"))
{return "Eva Melinda, S.Kom";}
else if(!strcmp(nip,"13540424"))
{return "Ade Hendini, S.Kom";}
else if(!strcmp(nip,"13540488"))
{return "Deni Maulana, ST";}
else if(!strcmp(nip,"13540773"))
{return "Abduyl Majid, S.Si";}
else if(!strcmp(nip,"13540999"))
{return "Desy R. Sari, M.Msi";}
}
char *gol(char nip[8])
{
if(!strcmp(nip,"13540121"))
{return "I";}
else if(!strcmp(nip,"13540424"))
{return "I";}
else if(!strcmp(nip,"13540488"))
{return "II";}
else if(!strcmp(nip,"13540773"))
{return "II";}
else if(!strcmp(nip,"13540999"))
{return "III";}
}
main()
{
class
{
public:
char nip[9];
int jam,hnr,ttl;
}guru[10];
int i,j;
long int tokes=0;
clrscr();
cout<<"=============================================="<
for(i=1;i<=j;i++)
{
cout<
cout<<"Nama : "<
{guru[i].hnr=15000;}
else if(!strcmp(gol(guru[i].nip),"II"))
{guru[i].hnr=26500;}
else if(!strcmp(gol(guru[i].nip),"III"))
{guru[i].hnr=88000;}
cout<<"Jumlah Jam Mengajar : ";cin>>guru[i].jam;
guru[i].ttl=guru[i].hnr*guru[i].jam;
tokes=tokes+guru[i].ttl;
}
clrscr();
cout<<"========================================================================="<
{
cout<
cout<<"======================================================================="<
}
16.15
|
|
This entry was posted on 16.15
You can follow any responses to this entry through
the RSS 2.0 feed.
You can leave a response,
or trackback from your own site.
0 komentar:
Posting Komentar