#include <iostream>
#include <string>
using namespace std;
int main()
{
string raptor_prompt_variable_zzyz;
int i;
int nilai;
int x;
int A[100];
A[100] = 0;
i =1;
nilai =0;
raptor_prompt_variable_zzyz ="Masukan X : ";
cout << raptor_prompt_variable_zzyz << endl;
cin >> x;
while (!(i>x))
{
raptor_prompt_variable_zzyz ="Masukan Bilangan : ";
cout << raptor_prompt_variable_zzyz << endl;
cin >> A[i];
if (A[i]>nilai)
{
nilai =A[i];
}
else
{
}
cout << "Nilai "<<i<<" ; "<<nilai << endl;
i =i+1;
}
cout << "Nilai Maksimum : "<<nilai << endl;
return 0;
}
Raptornya :
Comments
Post a Comment