#include<iostream>
#include<conio.h>
using namespace std;
int main(int argc, char** argv) {
float input,min,total,rata,t,batas;
cout<<"PROGRAM MENGHITUNG NILAI RATA-RATA, MINIMUM\n";
cout<<"*******************************************************\n\n";
cout<<"Masukkan Jumlah Siswa : "; cin>>batas;
for(t=1;t<=batas;t++){
cout<<"Masukan Nilai Siswa "<<t<<" : ";cin>>input;
total=total+input;
if(input<min||t==1){
min=input;
}
}
rata=total/batas;
cout<<"\n________________________";
cout<<"\nNilai Rata – Rata : "<<rata;
cout<<"\nNilai Minimum\t : "<<min;
getch();
}
#include<conio.h>
using namespace std;
int main(int argc, char** argv) {
float input,min,total,rata,t,batas;
cout<<"PROGRAM MENGHITUNG NILAI RATA-RATA, MINIMUM\n";
cout<<"*******************************************************\n\n";
cout<<"Masukkan Jumlah Siswa : "; cin>>batas;
for(t=1;t<=batas;t++){
cout<<"Masukan Nilai Siswa "<<t<<" : ";cin>>input;
total=total+input;
if(input<min||t==1){
min=input;
}
}
rata=total/batas;
cout<<"\n________________________";
cout<<"\nNilai Rata – Rata : "<<rata;
cout<<"\nNilai Minimum\t : "<<min;
getch();
}
Comments
Post a Comment