output |
#include <conio.h>
#include <stdio.h>
#include <windows.h>
void main()
{
int data,nilai;
float datum,rata,a=0;
char jawab;
do
{
system ("cls");
cout<<"================================"<<endl;
cout<<"| PROGRAM KANGGO NGITUNG ROTO2 |"<<endl;
cout<<"| sodok BLT (mBuuLeeTsz) |"<<endl;
cout<<"================================"<<endl<<endl;
cout<<"Ada berapa data : "; cin>>data;
for(nilai=1; nilai<=data; nilai++)
{
cout<<"Nilai data ke "<<nilai<<" : "; cin>>datum;
a += datum;
}
rata = a/data;
cout<<endl;
cout<<"Rata2 nilai = "<<rata<<endl;
if (rata>=80)
{
cout<<"Sampean mendapat nilai A"<<endl;
}
else if (rata>=70)
{
cout<<"Sampean mendapat nilai B"<<endl;
}
else
{
cout<<"Sampean mendapat nilai C"<<endl;
}
cout<<endl;
cout<<"Taseh pengen ngitung maleh??? (Y/T) ";
cin>>jawab;
cout<<endl;
}
while (jawab == 'y' || jawab == 'Y');
getche();
}
Share it to your friends..!
0 comments:
Post a Comment