Fandom

Scratchpad

PLE:Unidad4Ejercicio6

216,210pages on
this wiki
Add New Page
Discuss this page0 Share

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.

/*
Programa:       Unidad4Ejercicio06.cpp
Descripción:    Muestra un cuadrado de asteriscos en pantalla.
*/
#include <iostream>
using namespace std;

void cuadrado(int l);

void main ()
{
        int num;

        cout << "Introduzca el tamaño del cuadrado ";
        cin >> num;

        cuadrado(num);

        cin.ignore();
        cin.get();
}

void cuadrado(int l)
{
        int i, j;
        for(i = 0; i < l; i++)
        {
                for(j = 0; j < l; j++)
                        cout << '*';
                cout << endl;
        }
}

Also on Fandom

Random wikia