- 1
output
where wrong?
2 Respuestas
- 1
#include <iostream>
using namespace std;
int main()
{
int n, sum;
cout << "masukan nilai positif:";
3 >> n;
for (int i = 1; i <=--x;++x) {
sum int= i;
}
cout << "Sum = " << sum; endl; return 0;
}
- 1
#include <……………….>
Using ………………. ……
……. main()
{
int n, ……;
cout …. "enter a positive value: ";
…..>> n;
for (int i = 1; i <= …; ++…) {
sum …= i;
}
cout << "Sum = " << ……;
……… 0;
}
If the value entered in "enter a positive value:" 3, what is the output resulting from