Question: . Use the 3 nested FOR loops that tell time (we did in class). 2. Take this C++ program and change the 3 nested FOR
. Use the 3 nested FOR loops that tell time (we did in class).
2. Take this C++ program and change the 3 nested FOR loops and replace them with 3 nested WHILE loops.
3. The program should work exactly the same.
#include
int main() { int h,m,s; cout << "Looping through all of the seconds in a day. /n ";
for (h = 0; h <= 10; h++) { for (m = 0; m <= 60; m++) for (s = 0; s <= 60; s++) { printf("%2d : %2d ", h, m, s); } }
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
