Tugas 2.2

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> #include <iomanip> using namespace std; int main() { float absen, tugas, uts, uas, nilaiTotal; cout << "-----------------------------------------------------------------------" << endl; cout << "Program Menghitung Nilai Akhir" << endl; cout << "-----------------------------------------------------------------------" << endl; cout << "Masukan nilai Absen (10%): "<< endl; cin >> absen; cout << "Masukan nilai Tugas (20%): "<< endl; cin >> tugas; cout << "Masukan nilai UTS (30%): "<<endl; cin >> uts; cout << "Masukan nilai UAS (40%): "<<endl; cin >> uas; cout << "-----------------------------------------------------------------------" << endl; nilaiTotal = (absen * 0.1) + (tugas * 0.2) + (uts * 0.3) + (uas * 0.4); cout << fixed << setprecision(2); cout << "Nilai Total adalah : " << nilaiTotal << endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines