#include <iostream.h>
#include <conio.h>
#include <stdio.h>
main()
{
char nama[50];
int keaktifan , tugas , ujian ,hasilkeaktifan , hasiltugas , hasilujian, hasil;
clrscr();
cout<<"\tPROGRAM NILAI AKHIR";
cout<<endl;
cout<<"^^^-------------------------------^^^"<<endl;
cout<<endl;
cout<<"\t\(^o^)/ siswa yang bernama: ";gets(nama);
cout<<"\t\(^o^)/ dengan nilai persentasi yang dihasilkan: \(^o^)/"<<endl;
cout<<endl;
cout<<"^^^-------------------------------^^^"<<endl;
cout<<"\tnilai keaktifan :";cin>>keaktifan;
cout<<"\tnilai tugas :";cin>>tugas;
cout<<"\tnilai ujian :";cin>>ujian;
hasilkeaktifan = keaktifan * 20/100;
hasiltugas = tugas * 30/100;
hasilujian = ujian * 50/100;
hasil = hasilkeaktifan + hasiltugas + hasilujian;
cout<<endl;
cout<<"^^^-------------------------------^^^"<<endl;
cout<<endl;
cout<<"\tnilai keaktifan*20% :"<<hasilkeaktifan<<endl;
cout<<"\tnilai tugas*30% :"<<hasiltugas<<endl;
cout<<"\tnilai ujian*50% :"<<hasilujian<<endl;
cout<<endl;
cout<<"^^^-------------------------------^^^"<<endl;
cout<<endl;
cout<<"\tjadi siswa yang bernama:"<<nama<<endl;
cout<<"\tmemperoleh nilai akhir sebesar :"<<hasil<<endl;
cout<<endl;
cout<<"^^^-------------------------------^^^"<<endl;
getch();
}
No Comments
tugas 1
.