#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
char NM [30];
int nim,j,i;
float hasil, nt, nUTS, nUAS,na;
cout<<"======================================================"<<endl;
cout<<" PROGRAM MEMASUKKAN NILAI MAHASISWA "<<endl;
cout<<"------------------------------------------------------"<<endl;
cout<<" NAMA : RIDHA AMMI LESTARI"<<endl;
cout<<"------------------------------------------------------"<<endl;
cout<<" NIM : 1300018021"<<endl;
cout<<"======================================================"<<endl;
cout<<"masukkan jumlah mahasiswa : ";cin>>j;
for(i=1;i<=j;i++){
cout<<endl;
cout<<"Nama Mahasiswa ke-"<<i<<": ";cin>>NM;
cout<<"NIM : ";cin>>nim;
cout<<"Nilai Tugas : ";cin>>nt;
cout<<"Nilai UTS : ";cin>>nUTS;
cout<<"Nilai UAS : ";cin>>nUAS;
hasil=nt+nUTS+nUAS;
na=hasil/3;
cout<<endl;
cout<<endl;
cout<<NM<<" memiliki :"<<endl;
cout<<"Nilai Angka : "<<na<<endl;
cout<<"Nilai Huruf : ";
if (na>=80) {
cout<<"A"<<endl;
}
else if (na>=65) {
cout<<"B"<<endl;
}
else if (na>=50) {
cout<<"C"<<endl;
}
else if (na>=35) {
cout<<"D"<<endl;
}
else {
cout<<"E"<<endl;
}
}
system("PAUSE");
return EXIT_SUCCESS;
}
Senin, 16 Desember 2013
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar