#pragma argsused
#include <iostream.h>
class bilangan {
int index[100];
float b, maks;
int min;
public:
void input(){
cout<<"masukkan banyak data anda :";
cin>>b;
}
void proses(){
for (int i=1; i<=b; i++){
cout<<"data ke-["<<i<<"]:";
cin>>index[i];
}
for (int i=1; i<=b; i++){
if(index[i]>maks){
maks=index[i];
}
if(index[i]<min){
min=index[i];
}
}
cout<<"maksimal :"<<maks<<endl;
cout<<"minimal :"<<min<<endl;
}
};
int main(){
int x;
bilangan b;
b.input();
b.proses();
cin>>x;
return 0;
}
download program c++
download program jeliot
download program java
download program delphi
download program pascal
Friday, March 16, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment