#include <iostream>
#include <conio.h>
using namespace std;
int main(){
char nama [25];
char nim [10];
char kelas [5];
cout<<" Program Hitung Nilai Akhir Mahasiswa"<<endl;
cout<<endl;
cout<<endl;
cout<<"MASUKKAN DATA MAHASISWA "<<endl<<endl;
cout<<"NAMA : ";
cin.getline(nama, sizeof(nama));
cout<<"NIM : ";
cin.getline(nim, sizeof(nim));
cout<<"KELAS : ";
cin.getline(kelas, sizeof(kelas));
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"KRITERIA NILAI DARI DOSEN SEBAGAI BERIKUT:"<<endl;
cout<<"A>=90 "<<endl;
cout<<"B>=80 "<<endl;
cout<<"C>=70 "<<endl;
cout<<"D>=60 "<<endl;
cout<<"E>=OTHER "<<endl;
cout<<endl;
cout<<endl;
int Grade_Akhir;
cout<<"MASUKKAN NILAI ANDA" <<endl;
cin>>Grade_Akhir;
cout<<endl;
cout<<endl;
cout<<"JADI...."<<endl;
cout<<"MAHASISWA YANG BERNAMA : "<<nama<<endl;
cout<<"NIM : "<<nim<<endl;
cout<<"KELAS : "<<kelas;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"Grade Akhir Anda Adalah :"<<endl;
switch (Grade_Akhir/10)
{
case 10:
case 9:cout<<"A";
break;
case 8:cout<<"B";
break;
case 7:cout<<"C";
break;
case 6:cout<<"D";
break;
default:cout<<"E";
break;
}
cout<< endl;
cout<< endl;
cout<< endl;
cout<< endl;
if (Grade_Akhir <80)
cout << "CATATAN DOSEN : BELAJAR YANG RAJIN LAGI!!"<<endl;
else
cout<< "SELAMAT GRADE ANDA BAGUS, PERTAHANKAN!!"<<endl;
getch();
}
hasilnya :
0 comments:
Post a Comment