Question: Question 3 Convert the for loop in the program below to a while loop (6 marks) AP #include using namespace std; int main() { for

Question 3

  1. Convert the for loop in the program below to a while loop (6 marks) AP

#include

using namespace std;

int main() {

for (int i = 1; i <= 5; ++i) {

cout << "Assignments in the making " << endl;

}

return 0;

}

  1. Write a C++ program using a for loop to find the sum of the first 10 integers and

Display the results

  1. Demonstrate that a while loop can be used in question b above and explain

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!