Sum of many numbers. (Exercise for beginners)
- Make a loop that will ask the user for a number. Stop the loop if the user's input is 0.
- int sum = 0; Add the user's number to the sum until the user's input is 0.
Here is an example of how it should work.
This exercise seems to be easy but it's actually not that easy if you haven't heard anything about loops. I recommend learning loops. Once they will be your best friends, especially 'for' loop. In this exercise, you can use 'while' loop which seems easier but at the end of the day I highly recommend you to learn more about 'for' loops.
Unfortunately, I haven't got any time to code right now as I got so much to do off PC. Tomorrow will be a free day for me and then I will dive into learning again.
If you got any questions feel free to hit me up!🤓
Peace!✌️