#include<conio.h>
#include<iostream.h>
#include<stdio.h>
main()
{
char nama[20],kelas[10];
double nk,nt,nu;
clrscr();
//input(masukan)
cout<<"nama siswa :";gets(nama);
cout<<"kelas :";gets(kelas);
cout<<"nilai keaktifan :";cin>>nk;
cout<<"nilai tugas :";cin>>nt;
cout<<"nilai ujian :";cin>>nu;
cout<<endl;
nu=(nk*20/100+nt*30/100+nu*50/100);
cout<<"jadi siswa yang bernama:"<<nama<<endl;
cout<<"kelas :"<<(kelas)<<endl;
cout<<endl;
cout<<"nilai keaktifan *20%:"<<(nk*20/100)<<endl;
cout<<"nilai tugas *30%:"<<(nt*30/100)<<endl;
cout<<"nilai ujian *50%:"<<(nu*50/100)<<endl;
cout<<endl;
cout<<" memperoleh nilai akhir sebesar "<<nu<<endl;
getch();
}
Tidak ada komentar:
Posting Komentar