-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgradeCalculation.cpp
More file actions
58 lines (41 loc) · 907 Bytes
/
gradeCalculation.cpp
File metadata and controls
58 lines (41 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <iostream>
using namespace std;
int main()
{
float tugas, kuis, uts, uas;
float na;
char g;
cout << "Nilai Akhir dan Nilai Huruf" << endl;
cout << "==============================================" << endl ;
cout << "Masukkan Nilai Tugas : " ;
cin >> tugas ;
cout << "MAsukkan Nilai Kuis : " ;
cin >> kuis ;
cout << "Masukkan Nilai UTS : " ;
cin >> uts ;
cout << "Masukkan Nilai UAS : " ;
cin >> uas ;
cout << "==============================================" << endl ;
na = (tugas * 20/100) + (kuis * 20/100) + (uts * 30/100) + (uas * 30/100);
cout << "Nilai Akhir : " << na << endl ;
if(na <= 20){
g = 'E';
}
else if (na <= 40) {
g = 'D';
}
else if (na <= 60 ) {
g = 'C';
}
else if (na <= 80) {
g ='B';
}
else if (na <= 100) {
g = 'A';
}
else {
cout << "Grade Tidak Ditemukan";
}
cout << "Grade : " << g << endl ;
return 0;
}