TUGAS D
#include
#include
#include
#include
char *grade(char ttl)
{
if(ttl>80)
{return "A";}
else if(ttl>70)
{return "B";}
else if(ttl>60)
{return "C";}
else if(ttl>50)
{return "D";}
else
{return "E";}
}
char *mk(char kd[4])
{
if(!strcmp(kd, "151"))
{return "Algoritma dan Pemrograman 1";}
else if(!strcmp(kd, "422"))
{return "linux 1";}
else if(!strcmp(kd, "733"))
{return "PPN II(Access)";}
else if(!strcmp(kd, "772"))
{return "DBMS";}
}
main()
{
struct
{
char nim[8],nm[20];
int prs,tgs,uts,uas,ttl;
}nilai[10];
int i,j;
char kd[4];
clrscr();
cout<<"=========================================="<
cout<<"Jumlah Data Mahasiswa :";cin>>j;
for(i=1;i<=j;i++)
{
cout<
cout<<"Nama :";cin>>nilai[i].nm;
cout<<"Nilai Presensi :";cin>>nilai[i].prs;
cout<<"Nilai Tugas :";cin>>nilai[i].tgs;
cout<<"Nilai UTS :";cin>>nilai[i].uts;
cout<<"Nilai UAS :";cin>>nilai[i].uas;
nilai[i].ttl=(0.1*nilai[i].prs)+(0.2*nilai[i].tgs)+(0.3*nilai[i].uts)+(0.4*nilai[i].uas);
}
clrscr();
cout<<"Kode Mata Kuliah :"<
{
cout<
cout<<"=========================================================================="<
}
15.56
|
|
This entry was posted on 15.56
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