#include <iostream>
using namespace std;
int main( )
{
//deklarasi variabel//
float pai, ppkn, bind, mtk, si, bing, kjd, aij, tlj, rata;
char nilai_huruf;
cout << "Nilai PSAJ SMK YPT 1 PURBALINGGA" << endl;
cout << "--------------------------------" << endl;
cout << "Masukkan Nilai" << endl;
//input
cout << "Pendidikan Agama : " ;
cin >> pai;
cout << "PPKn : " ;
cin >> ppkn;
cout << "Bahasa Indonesia : " ;
cin >> bind;
cout << "Sejarah Indonesia : " ;
cin >> si;
cout << "Bahasa Inggris : " ;
cin >> bing;
cout << "Komputer Jaringan Dasar: " ;
cin >> kjd;
cout << "Administrasi Infrastruktur Jaringan: " ;
cin >> aij;
cout << "Teknologi Layanan Jaringan: " ;
cin >> tlj;
//rumus rata rata//
rata= ( pai+ ppkn+ bind+ si+ bing+ kjd+ aij+ tlj) / 8 ;
cout << "_" ;
cout << " \n Nilai Rata Rata : \n " << rata<< endl;
//Predikat//
if ( ( rata>= 90 ) )
cout << "Predikat: A" ;
else if ( ( rata>= 80 ) )
cout << "Predikat: B" ;
else if ( ( rata>= 70 ) )
cout << "Predikat: C" ;
else if ( ( rata>= 60 ) )
cout << "Predikat: D" ;
else if ( ( rata< 60 ) )
cout << "Predikat: E" ;
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKQp7CiAgICAvL2Rla2xhcmFzaSB2YXJpYWJlbC8vCiAgICBmbG9hdCBwYWksIHBwa24sIGJpbmQsIG10aywgc2ksIGJpbmcsIGtqZCwgYWlqLCB0bGosIHJhdGE7CiAgICBjaGFyIG5pbGFpX2h1cnVmOwogICAgCiAgICBjb3V0PDwiTmlsYWkgUFNBSiBTTUsgWVBUIDEgUFVSQkFMSU5HR0EiIDw8ZW5kbDsKICAgIGNvdXQ8PCItLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSIgPDxlbmRsOwogICAgY291dDw8Ik1hc3Vra2FuIE5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