Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- #include <iostream>
- using namespace std;
- main()
- {
- float a[100];
- int i,min,max;
- /*cout<<"Masukan Jumlah Input Bilangan : ";
- cin>>k;
- cout<<endl;*/
- cout<<"======[ Input Bilangan ]======"<<endl<<endl;
- for(i=0; i<10; i++){
- cout<<"Masukan Bilangan Ke- "<<i+1<<" : ";
- cin>>a[i];
- }
- max = a[0];
- for(i=1; i<10; i++){
- if(min>a[i])
- min = a[i];
- if(max<a[i])
- max = a[i];
- }
- cout<<endl<<"=================================="<<endl;
- cout<<"Bilangan Terbesar Adalah "<<max<<endl;
- cout<<"Bilangan Terkecil Adalah "<<min<<endl;
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.