C++ for statement Count down to the lift off with a delay created by for loop

Description

C++ for statement Count down to the lift off with a delay created by for loop

#include <iostream>
using namespace std;
int main()/*from  w  w  w  .  ja  v  a2  s .  co  m*/
{
   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;
}



PreviousNext

Related