Tugas2.2

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; //Nama : Nagita Elsa Saputri //Nim : 3420230026 int main() { int absen, tugas, uts, uas; float total; printf("\n=============================================="); printf("\n==== Program Menghitung Nilai Akhir =========="); printf("\n=============================================="); //input nilai printf("\nMasukan nilai Absen (10%) : "); scanf("%d", &absen); printf("\nMasukan nilai Tugas (20%) : "); scanf("%d", &tugas); printf("\nMasukan nilai UTS (30%) : "); scanf("%d", &uts); printf("\nMasukan nilai UAS (40%) : "); scanf("%d", &uas); //menghitung nilai akhir total = (absen * 0.10) + (tugas * 0.20) + (uts * 0.30) + (uas * 0.40); //hasil printf("\n=============================================="); printf("\nNilai akhir adalah : %.2f", total); printf("\n=============================================="); return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines