Aplikasi Penghitung Nilai Siswa | Source Code C++



#include <iostream>
//Hasan Ma'ruf | hasanxch@gmail.com | TIF15 | UIN-SUKA
//Tugas Pemrograman | Semester 1
using namespace std;
int main(){
cout << "=====================================\n";
cout << "  Software Penghitung Nilai Kuliah"<<endl;
cout << "=====================================\n\n";
float a, b, c, d, e, f, g, h, i;
cout << "Nilai UAS     : ";
cin  >> a;
cout << "Nilai UTS     : ";
cin  >> b;
cout << "Nilai Tugas 1 : ";
cin  >> c;
cout << "Nilai Tugas 2 : ";
cin  >> d;
cout << "Nilai Tugas 3 : ";
cin  >> e;
cout << "Nilai Quiz 1  : ";
cin  >> f;
cout << "Nilai Quiz 2  : ";
cin  >> g;
h = (a*30/100)+(b*20/100)+(((c+d+e)/3)*30/100)+(((f+g)/2)*20/100);
cout << "--------------------------------------\n";
cout << "Nilai akhir kamu : "<<h<<endl;
cout << "======================================\n";
if (h<40){
cout << "                 D";
} else if (h<60){
cout << "                 C";
} else if (h<80){
cout << "                 B";
} else if (h<90){
cout << "                 B+";
} else if (h<=100){
cout << "                 A";
}
cout <<endl;
cout << "======================================\n\n";
system ("pause");
}


Post a Comment