output | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

output

where wrong?

28th Jan 2021, 2:00 PM
Moch Reza Madhani Putra
Moch Reza Madhani Putra - avatar
5 Answers
+ 6
I am not asking the explanation
28th Jan 2021, 2:18 PM
Aysha
Aysha - avatar
+ 6
I am asking what output do you expect from this program
28th Jan 2021, 2:19 PM
Aysha
Aysha - avatar
+ 5
Please can you say what did you solve?
28th Jan 2021, 2:14 PM
Aysha
Aysha - avatar
- 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; }
28th Jan 2021, 2:00 PM
Moch Reza Madhani Putra
Moch Reza Madhani Putra - avatar
- 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
28th Jan 2021, 2:17 PM
Moch Reza Madhani Putra
Moch Reza Madhani Putra - avatar