C++ examples for Data Type:int
Countdown to the liftoff with a delay created by for loop.
#include <iostream> using namespace std; int main()//w w w. j a v a 2s. com { int cd, delay; for (cd=10; cd>=0; cd--) { { for (delay=1; delay <=30000; delay++); } // Delay program. cout << cd << "\n"; // Print countdown value. } // End of outer loop cout << "Blast off!!! \n"; return 0; }