#include <iostream>
#include <iomanip>
using namespace std;
int main() {
string Nama, NIM, sks;
float ips1, ips2, ips3, ipk;
cout << "Masukkan nama anda : "; getline(cin, Nama);
cout << "Masukkan NIM anda : "; cin >> NIM;
cout << "Masukkan IP Semester 1 : "; cin >> ips1;
cout << "Masukkan IP Semester 2 : "; cin >> ips2;
cout << "Masukkan IP Semester 3 : "; cin >> ips3;
cout << "=============================================================" << endl;
if (ips1>=1.00&&ips2>=1.00&&ips3>=1.00&&ips1<=4.00&&ips2<=4.00&&ips3<=4.00) {
ipk=(ips1+ips2+ips3)/3;
cout << "Nama : " << Nama << endl;
cout << "NIM : " << NIM << endl;
cout << "IPK kamu adalah : " << std::setprecision(3) <<ipk << endl;
// std::cout<<std::setprecision(3)<<ipk<<std::endl;
if (ips3>=3.00&&ips3<=4.00) {
cout << "Semester berikutnya kamu dapat mengambil SKS maksimal 24 SKS" << endl;
} else if (ips3>=2.00&&ips3<=2.99) {
cout << "Semester berikutnya kamu dapat mengambil SKS maksimal 20 SKS" << endl;
} else {
cout << "Semester berikutnya kamu dapat mengambil SKS maksimal 19 SKS" << endl;
}
} else {
ipk=(ips1+ips2+ips3)/3;
cout << "Nama : " << Nama << endl;
cout << "NIM : " << NIM << endl;
cout << "IPK kamu adalah : " << std::setprecision(3) <<ipk << endl;
cout << "Input yang anda masukkan tidak sesuai" << endl;
// std::cout<<std::setprecision(3)<<ipk<<std::endl;
}
return 0;
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}