219,358pages on
this wiki
Add New Page
Discuss this page0 Share
Programa:       Unidad2Ejercicio28.cpp
Fecha:          09/11/2006
Descripción:    Muestra una pirámide de asteriscos
#include <iostream>
using namespace std;
void main()
        int i, j, numLin=5, numEsp=40, numAst= 1;

        for(i = 1; i <= numLin; i++)
            // Muestro los espacios
            for(j=1; j <= numEsp; j++)
                  cout << ' ';
            // Muestros los asteriscos que componen la linea
            for(j=1; j <= numAst; j++)
                  cout << '*';
            // Salto de línea
            cout << endl;
            numAst += 2;


Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random wikia