Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using static System.Console;
- namespace Laboratorio_4
- {
- class Program
- {
- static void Main(string[] args)
- {
- // Configurar la codificacion de la consola
- OutputEncoding = System.Text.Encoding.Unicode;
- Clear();
- //char c = '\u2593';
- Write("> Ingrese la altura del rectangulo: ");
- int height = int.Parse(ReadLine());
- Write("> Ingrese la ancho del rectangulo: ");
- int width = int.Parse(ReadLine());
- Write("> Ingrese el unicide del carácter de impresion: ");
- int unicode_symbol = int.Parse(ReadLine(), System.Globalization.NumberStyles.HexNumber);
- // Dont Repeat Yourself
- // Configurando los colores de la figura
- ForegroundColor = ConsoleColor.Blue;
- BackgroundColor = ConsoleColor.DarkRed;
- for (int shape_height = 1; shape_height <= height; shape_height++)
- {
- for (int shape_with = 1; shape_with <= width; shape_with++)
- {
- // Write("{0}", ((char)unicode_symbol).ToString());
- Write("{0}", (char)unicode_symbol);
- }
- WriteLine("");
- }
- // Reestableciendo el color de impresion original
- ResetColor();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement