Return To CS 110 Home

Colour Theme   Font Size Options
 
   
   
   
Exercise 1

Flexible Count-controlled while Loop Exercise:

Use ex1_count.cpp in the replit team project or copy the following code into your IDE:


When it is complete, this program will allow the user to add together any number of integers. It will use a while with two variable - one for the loop counter, and one for the total number of loop repetition. The user first types how many numbers they wish to add, then types the numbers one at a time pressing enter after each one.

Instructions:

When you are done: