#include <iostream> using namespace std; int main() { int num = 1; int number; int total = 0; while (num <= 5) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

#include <iostream> using namespace std; int main() { int num = 1; int number; int total = 0; while (num <= 5)

Someone elplain this how the output is 50 if i enter 10

4th Mar 2018, 1:36 PM
Rahul Nath
Rahul Nath - avatar
2 Answers
+ 7
@Rahul: Please type the code in code playground, save then link it to your question with the + insert | insert code option.
4th Mar 2018, 11:12 PM
jay
jay - avatar
+ 2
The code you posted is not complete
4th Mar 2018, 1:44 PM
Alex
Alex - avatar