Tugas 2.2

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { int absen, tugas, uts, uas; float nilai_total; cout << "===================================" << endl; cout << "Program Menghitung Nilai Akhir" << endl; cout << "===================================" << endl; printf("Masukkan Nilai Absen (10%) :\n"); scanf("%d", &absen); printf("Masukkan Nilai Tugas (20%) :\n"); scanf("%d", &tugas); printf("Masukkan Nilai UTS (30%) :\n"); scanf("%d", &uts); printf("Masukkan Nilai UAS (40%) :\n"); scanf("%d", &uas); nilai_total = (absen * 0.1) + (tugas * 0.2) + (uts * 0.3) + (uas * 0.4); cout << "====================================" << endl; printf("Nilai Total Adalah : %.2f \n", nilai_total); cout << "====================================" << endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines