Common Computer Science References
At the end of this lesson, you will be able to:
understand and use a while loop
decision statements
go over While Loops , Computer Based Problem Solving
go over example while loop (see source code below: ↓)
create your own while loop that will solve this problem:
ask the user for a positive integer, then add all the whole numbers up to that number
Ex: user enters 5: 1+2+3+4+5=15, so 15 is outputted (see image below: ↓)
recreate the same above program in C
NOTE: You can turn on "Closed Captions" to see a printout of what is being said by selecting the "CC" button.
You can also have it translate the closed captions by going to "Settings, Subtitles/CC, Auto-translate" and then pick your prefered language.