InformáticaBásico1 respuestas

Escriba un programa que pida al usuario ingresar la altura y el ancho de un rectángulo y lo dibuje utilizando asteriscos?

Escriba un programa que pida al usuario ingresar la altura y el ancho de un rectángulo y lo dibuje utilizando asteriscos.

6Dangell

En resumen

Console. WriteLine("Longitud del rectangulo") ; int width = (int)Console. ReadLine() ; Console. WriteLine("Altitud del rectangulo") ; int height = (int)Console. ReadLine() ; for(int y = 0 ; y < height ; y + + ) { for(int x = 0 ; x < width ; x + + ) { Console.

Mejor respuesta

Angiefiorella7877

10

Console.

WriteLine("Longitud del rectangulo") ;

int width = (int)Console.

ReadLine() ;

Console.

WriteLine("Altitud del rectangulo") ;

int height = (int)Console.

ReadLine() ;

for(int y = 0 ; y < height ; y + + )

{

for(int x = 0 ; x < width ; x + + )

{

Console.

Write(" * ") ;

}

Console.

WriteLine("") ;

}

Console.

Read() ;