Why my new c++ code doesn't working??? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why my new c++ code doesn't working???

it's so sad... 😢

3rd Mar 2018, 9:00 PM
Климов Данил
Климов Данил - avatar
2 Answers
+ 3
There are multiple errors. Your main function has no curly bracket (->no body) cin >> var (instead of cin << var) the variable num in the for loop needs to be initialised (int num = 0) What do you want the code to do? It seems a bit odd what's going on there.
3rd Mar 2018, 9:06 PM
Alex
Alex - avatar