SHARE
TWEET

Program Nilai Akhir Mahasiswa

a guest Oct 14th, 2019 167 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6.     system ("color 0A");
  7.    
  8.     float nilai_tugas, nilai_uts, nilai_uas, nilai_akhir;
  9.     char ulang;
  10.    
  11.     cout << "====================================================="<< endl;
  12.     cout << "Aplikasi Sederhana Menghitung Nilai Ujian Mahasiswa"<< endl;
  13.     cout << "Nama : TEDY FAZRIN"<< endl;
  14.     cout << "www.tedybearblog.tech"<< endl;
  15.     cout << "====================================================="<< endl;
  16.    
  17.     awal:
  18.     cout << endl << "Masukkan nilai tugas = ";
  19.     cin >> nilai_tugas;
  20.    
  21.     cout << endl << "Masukkan nilai uts = ";
  22.     cin >> nilai_uts;
  23.    
  24.     cout << endl << "Masukkan nilai uas = ";
  25.     cin >> nilai_uas;
  26.    
  27.     nilai_tugas = nilai_tugas*0.3;
  28.     nilai_uts = nilai_uts*0.3;
  29.     nilai_uas = nilai_uas*0.4;
  30.    
  31.     nilai_akhir =  nilai_tugas + nilai_uts + nilai_uas;
  32.    
  33.     cout << endl << "====================================================="<< endl;
  34.    
  35.     if(nilai_akhir > 80){
  36.         cout << endl << "Hasil nilai akhir nya adalah = "<< nilai_akhir <<endl;
  37.         cout << endl << "Dengan Grade = A"<< endl;
  38.     }
  39.     else if(nilai_akhir >= 80 || nilai_akhir > 60 ){
  40.         cout << endl << "Hasil nilai akhir nya adalah = "<< nilai_akhir <<endl;
  41.         cout << endl << "Dengan Grade = B"<< endl;
  42.     }
  43.     else if(nilai_akhir  >= 60 || nilai_akhir > 40){
  44.         cout << endl << "Hasil nilai akhir nya adalah = "<< nilai_akhir <<endl;
  45.         cout << endl << "Dengan Grade = C"<< endl;
  46.     }
  47.     else if(nilai_akhir >= 40 || nilai_akhir > 20){
  48.         cout << endl << "Hasil nilai akhir nya adalah = "<< nilai_akhir <<endl;
  49.         cout << endl << "Dengan Grade = D"<< endl;
  50.     }
  51.     else {
  52.         cout << endl << "Hasil nilai akhir nya adalah = "<< nilai_akhir <<endl;
  53.         cout << endl << "Dengan Grade = E"<< endl;
  54.         }
  55.        
  56.     cout << endl << "Apakah ingin mengulang? [Y/N] = ";
  57.     cin >> ulang;
  58.     cout << endl << "====================================================="<< endl;
  59.     if (ulang == 'Y' || ulang == 'y'){
  60.         goto awal;
  61.     }
  62.     else cout << endl << "Selesai Terimakasih";
  63.        
  64. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top