Question: 2. b. a. A loop is a control structure that causes a statement or group of statements to repeat. In C++ there are three

2. b. a. A loop is a control structure that causes a

2. b. a. A loop is a control structure that causes a statement or group of statements to repeat. In C++ there are three looping control structures, the difference between each of these loops is how they control the repetition. i. ii. List each of the C++ loops and give ONE (1) ideal use case for each loop. Write a program that uses a loop to display the projected membership fees for the next six years of a country club. The membership fee is charged at RM 2500 per year and the country club announced it will increase its membership fee by 4% each year for the next six years. Convert the while loop in FIGURE Q2(b) into a for loop. int count = 0; while (count < 50) ( } [3 marks] count++; cout < < "count is " < < count < < endl; FIGURE Q2(b) [5 marks] [3 marks]

Step by Step Solution

3.50 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

2 a i Three loops of C are For loop It is used when you know the loop should ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!