Question: Convert the following while loop to a do-while loop: cin >> index; while (index != -1) { } cout < < Index is
Convert the following while loop to a do-while loop: cin >> index; while (index != -1) { } cout < < "Index is " < < index < < endl; index--;
Step by Step Solution
There are 3 Steps involved in it
Heres the equivalent code using a dowhile loop cpp do cin index if index 1 cout Index is i... View full answer
Get step-by-step solutions from verified subject matter experts
