#include<iostream>
using namespace std;
main()
{
int nilai[100];
int i,inp,max,min;
cout<<" Masukkan Banyak Inputan : "; cin>>inp;
cout<<"\n";
max=-1000;
min=1000;
for(i=0; i<=inp; i++)
{
cout<<" Nilai Ke- "<<i<<" : ";
cin>>nilai[i];
}
cout<<"\n";
for(i=0; i<=inp; i++)
if(nilai[i]>max)
max=nilai[i];
cout<<" Nilai Maksimum = "<<max;
cout<<"\n";
return 0;
}
Output :
Tidak ada komentar:
Posting Komentar