Tugas 2.2

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> #include <iomanip> // For setting precision using namespace std; //Nama : Ilham Satria Wijaya //Nim : 3420230031 int main() { float absen, tugas, uts, uas, total; // Input cout << "Program Menghitung Nilai Akhir\n"; cout << "------------------------------\n"; cout << "Masukan nilai Absen (10%): \n"; cin >> absen; cout << "Masukan nilai Tugas (20%): \n"; cin >> tugas; cout << "Masukan nilai UTS (30%): \n"; cin >> uts; cout << "Masukan nilai UAS (40%): \n"; cin >> uas; // Calculation total = (absen * 0.10) + (tugas * 0.20) + (uts * 0.30) + (uas * 0.40); // Output cout << "------------------------------\n"; cout << "Nilai Total adalah : " << fixed << setprecision(2) << total << endl; cout << "------------------------------\n"; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines