Created
September 22, 2020 05:31
-
-
Save dihardmg/4a7a1127bdee4d65aeaed52b8716c6f0 to your computer and use it in GitHub Desktop.
menghitung rata-rata 3 tugas (Tugas 1, Tugas 2, Tugas 3) dan ditentukan nilai minimum kelulusannya adalah 75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
int ipa; | |
int rata; | |
int ips; | |
int mtk; | |
int jml; | |
cout<<"masukan nilai IPA : "; | |
cin>>ipa; | |
cout<<"masukan nilai MTK : "; | |
cin>>mtk; | |
cout<<"masukan nilai IPS : "; | |
cin>>ips; | |
jml =ipa+mtk+ips; | |
rata =jml/3; | |
if (rata > 75) | |
{ | |
cout<<"Nilai Akhir adalah : "; | |
cout << rata ; | |
cout<<" maka LULUS" << endl; | |
} | |
else | |
{ | |
cout << "Nilai Akhir adalah : "; | |
cout << rata ; | |
cout<<" maka TIDAK LULUS" << endl; } | |
cout <<"Happy coding c++ ^_^" << endl; | |
system("PAUSE"); | |
system("SUCCESS"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment