program c++ penilaian rapot


Contoh Nilai Rapot dengan bahasa C++ :
                                              Hasil gambar untuk c++
#include<iostream>


using namespace std;

int main(){
int pai[50]={},indo[50]={},pkn[50]={},u,i;
double jum[50]={},rat[50]={};
string nama[50],nis[50],kelas[50];
char a,ts;

u=0;


cout<<"Program Rapot SKMN 1 CIMAHI"<<endl;
cout<<"---------------------------"<<endl<<endl;
do{

cout<<"NIS : ";
cin>>nis[u];

cout<<"Nama : ";
cin>>nama[u];

cout<<"Kelas : ";
cin>>kelas[u];

cout<<"PAI : ";
cin>>pai[u];

cout<<"B.Indonesia : ";
cin>>indo[u];

cout<<"PPKN : ";
cin>>pkn[u];

system("cls");

u++;

cout<<"Tambah Siswa [Y/T] : ";
cin>>ts;
system("cls");
}

while(ts=='y'||ts=='Y');

cout<<"NIS\t"<<"Nama Siswa\t"<<"Kelas\t"<<"Jumlah Nilai\t"<<"Rata-rata\t"<<endl;
cout<<"---\t"<<"----------\t"<<"-----\t"<<"------------\t"<<"---------\t"<<endl;


for(i=0;i<u;i++){

jum[i]=pai[i]+indo[i]+pkn[i];
rat[i]=jum[i]/3;


cout<<nis[i]<<"\t"<<nama[i]<<"\t\t"<<kelas[i]<<"\t"<<jum[i]<<"\t\t"<<rat[i]<<endl;

}

}

Comments

Archive

Contact Form

Send