#include <iostream>
#include <string>
using namespace std;
int main()
{
string raptor_prompt_variable_zzyz;
int i;
int n;
int jumlah;
int x;
int rata;
raptor_prompt_variable_zzyz ="Masukkan n";
cout << raptor_prompt_variable_zzyz << endl;
cin >> n;
jumlah =0;
i =1;
while (!(i>n))
{
raptor_prompt_variable_zzyz ="Masukkan x";
cout << raptor_prompt_variable_zzyz << endl;
cin >> x;
jumlah =jumlah+x;
i =i+1;
}
rata =jumlah;
cout << rata << endl;
return 0;
}
#include <string>
using namespace std;
int main()
{
string raptor_prompt_variable_zzyz;
int i;
int n;
int jumlah;
int x;
int rata;
raptor_prompt_variable_zzyz ="Masukkan n";
cout << raptor_prompt_variable_zzyz << endl;
cin >> n;
jumlah =0;
i =1;
while (!(i>n))
{
raptor_prompt_variable_zzyz ="Masukkan x";
cout << raptor_prompt_variable_zzyz << endl;
cin >> x;
jumlah =jumlah+x;
i =i+1;
}
rata =jumlah;
cout << rata << endl;
return 0;
}
No comments:
Post a Comment