You are on page 1of 2

/*Algoritmo empleando Pseudocódigo */ /* Programa del rectángulo de asteriscos*/

*** #include <stdio.h>


***
*** void main()
{
col = 3 int col = 3;
ren = 3 int ren = 3;
i,j /* Estructuras de Datos: contadores o int i,j;
variables de control */

i = 1; i = 1;
HACER MIENTRAS i <= ren while (i <= ren)
{
j = 1; j = 1;
HACER MIENTRAS j <= col while (j <= col)
{
DESPLEGAR * printf("*");
j = j + 1; j = j + 1;
FIN HACER }
SALTAR RENGLON printf("\n");
i = i + 1; i = i + 1;
FIN HACER }
}

____________________________________________ ____________________________________
Prueba de Escritorio: RAM Prueba de Escritorio:

col ren _i_ _j_ col ren _i_ _j_


3 3 1 1 3 3 1 1
2 2 2 2
3 3 3 3 3 3
4 4 4 4
1 col ren 1
2 2
3 4 4 3
4 4
1 i j 1
2 2
3 3
4 4
Salida: Salida:
*** ***
*** ***
*** ***

You might also like