TABEL SEDERHANA
#include<iostream.h>
void main()
{
char b[5][10]={"Andi","Melissa","Herman","Joko","Wayan"};
int nilai[5]={84,76,54,46,76};
int i;
cout<<"Nama\tNilai\tKeterangan\n";
cout<<"==========================\n";
for(i=0;i<5;i++)
{
if (nilai[i]>=70)
{cout<<b[i]<<"\t"<<nilai[i]<<"\tLulus";
cout<<endl;}
else
{cout<<b[i]<<"\t"<<nilai[i]<<"\tTidak Lulus";
cout<<endl;}
}
}
No comments:
Post a Comment