AlgoritmaTugas2.2

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { int absen, tugas, uts, uas; float total; cout<<"--------------------------------"<<endl; cout<<"Program Menghitung Nilai Akhir"<<endl; cout<<"--------------------------------"<<endl; printf("Masukan 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); cout<<"\n--------------------------------"<<endl; total = (0.1 * absen) + (0.2 * tugas) + (0.3 * uts) + (0.4 * uas); printf("Nilai Total adalah : %.2f", total); cout<<"\n--------------------------------"<<endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines