Question: The following C++ code using while loop: #include #include using namespace std; int main() { int number = while (counter < loop_iteration) { 0;
The following C++ code using while loop: #include #include using namespace std; int main() { int number = while (counter < loop_iteration) { 0; int counter = 0; int loop_iteration = 10%; number = number * 2 + counter; counter++; } cout < < number < < endl; return 0; } Convert the above While loop into a For loop. The value of output "number" must not be changed after converting.
Step by Step Solution
3.31 Rating (148 Votes )
There are 3 Steps involved in it
include iostream include string using nam... View full answer
Get step-by-step solutions from verified subject matter experts
