web123456

Basics of C++ - Loop Nesting

#include <iostream> #include <iomanip> #include <> using namespace std; int main(void) { for (int i = 0; i < 24; i++) { for (int j = 0; j < 60; j++) { for(int k = 0; k < 60; k++) { cout << setw(2) << i << "hour" << setw(2)<< j << "point" << setw(2)<< k << "Second" << endl; Sleep(1000); //Pause for 1 second } } } system("pause"); return 0; }