Cuenta regresiva en un ciclo for

Categorías: Lenguaje C++

   1 // cuenta regresiva usando un ciclo for
   2 #include <iostream>
   3 using namespace std;
   4 int main ()
   5 {
   6   for (int n=10; n>0; n--) {
   7     cout << n << ", ";
   8   }
   9   cout << "FUEGO!\n";
  10   return 0;
  11 }

Algoritmantes/EjemploFor (last edited 2008-04-20 14:39:10 by localhost)