#include
#include
#include
main() { clrscr();
char nama[15][50],lagi;
float nt[50],nut[50],nua[50],na[50];
float rata;
char *gd[50];
int i=1,j;
input:
cout<<" DAFTAR NILAI "<
cout<<" MATERI PEMROGRAMAN C++ "<
cout<<"-------------------------------------"<
while(lagi='y' || lagi=='Y')
{
cout<
cout<<" Mahasiswa Ke - "<
cout<<" Nama Mahasiswa : "; cin>>nama[i];
cout<<" Nilai Tugas : "; cin>>nt[i];
cout<<" Nilai UTS : "; cin>>nut[i];
cout<<" Nilai UAS : "; cin>>nua[i];
cout<
cout<<" Ingin Input Data Lagi [Y/T] : "; cin>>lagi;
if(lagi=='T' || lagi=='t') goto hasil;
}
hasil: clrscr();
cout<<" DAFTAR NILAI "<
cout<<" MATERI PEMROGRAMAN C++ "<
cout<<"--------------------------------------------------------"<
cout<<" No. Nama Nilai Grade "<
cout<<" Mahasiswa Tugas UTS UAS Akhir "<
cout<<"--------------------------------------------------------"<
for(j=1;j
{
gotoxy(3,12+j); cout<
gotoxy(12,12+j); cout<
gotoxy(25,12+j); cout<
gotoxy(33,12+j); cout<
gotoxy(40,12+j); cout<
na[j]=(0.3*nt[j])+(0.3*nut[j])+(0.4*nua[j]);
gotoxy(46,12+j); cout<
if(na[j]>=80) { gd[j]="A"; }
else if(na[j]>=70) { gd[j]="B"; }
else if(na[j]>=59) { gd[j]="C"; }
else if(na[j]>=50) { gd[j]="D"; }
else {gd[j]="E"; }
gotoxy(53,12+j); cout<
rata=(rata+na[j])/j;
}
cout<
cout<
cout<
keluar:
getch();
}
0 komentar