Anda di halaman 1dari 5




MOCHAMAD YUSUF
#include <iostream>
/*===============================
Menghitung Nilai Akhir Ujian Anda
===============================*/
using namespace std;
int main()
{
//Variable
int k1, k2, u, p, cp1, cp2, na;
float proses_20 = 20, proses_40 = 40, cp2_40 = 40, cp1_60 = 60;
//Input nilai proses
cout<<"=========================================="<<endl;
cout<<"Masukan Nilai Akhir Mata Kuliah Ujian Anda"<<endl;
cout<<"=========================================="<<endl;
cout<<"Nilai Kuis Pertama Anda\t\t:";cin>>k1;
k1=k1*proses_20/100;
cout<<"Nilai Kuis Kedua Anda\t\t:";cin>>k2;
k2=k2*proses_20/100;
cout<<"Nilai Ujian Anda\t\t:";cin>>u;
u=u*proses_20/100;
cout<<"Nilai Praktikum Anda\t\t:";cin>>p;
p=p*proses_40/100;
cout<<"Nilai Capaian Pembelajaran 1\t:";cin>>cp1;
cp1=cp1*cp1_60/100;
cout<<"Nilai Capaian Pembelajaran 2\t:";cin>>cp2;
cp2=cp2*cp2_40/100;
cout<<"=========================================="<<endl;
//proses ending
na=k1+k2+u+p;
//Input cp1 & cp2

//Output nilai proses


cout<<"=========================================="<<endl;
cout<<"Nilai Kuis Pertama\t\t:"<<k1<<endl;
cout<<"Nilai Kuis Kedua\t\t:"<<k2<<endl;
cout<<"Nilai Ujian\t\t\t:"<<u<<endl;
cout<<"Nilai Praktikum\t\t\t:"<<p<<endl;
cout<<"Nilai Proses Anda\t\t:"<<na<<endl;
cout<<"=========================================="<<endl;
//Output cp1 & cp2
cout<<"=========================================="<<endl;
cout<<"Nilai Capaian Pembelajaran 1\t:"<<cp1<<endl;
cout<<"Nilai Capaian Pembelajaran 2\t:"<<cp2<<endl;
cout<<"=========================================="<<endl;
//Output total proses+cp
cout<<"Jadi Nilai Akhir Anda Adalah\t:"<<na<<endl;
return 0;
}
Compile & Run:
#include <iostream>
/*===============================
Menghitung Nilai Akhir Ujian Anda
===============================*/
using namespace std;
int main()
{
//variable
float al, mm, di, ip, sks=9;
//input
cout<<"Masukan Jumlah Nilai Bobot Anda"<<endl;
cout<<"Masukan Nilai Algoritma Anda\t\t:";cin>>al;
al*3;
cout<<"Masukan Nilai Multimedia Anda\t\t:";cin>>mm;
mm*3;
cout<<"Masukan Nilai Sistem Digital Anda\t:";cin>>di;
di*3;
ip=al+mm+di;

//output
cout<<"IP Yang Anda Peroleh\t\t\t:"<<ip/3;
}
Compile & Run: