need a hollow square 1-20 only. I cannot figure out how to make it hollow, only solid. where if you input something less than 1=a square of 1 asterek(sp) and if greater than 20=square of 20x20
here is what I have, just don't understand how to make it hollow, do I use a loop or if else..
Code:static void Main(string[] args) { int side; Console.Write("Enter the side of your square: "); side = Convert.ToInt32(Console.ReadLine()); Console.WriteLine(); for (int i = 0; i < side;++ i ) { for (int j = 0; j < side; ++j ) Console.Write("* "); Console.WriteLine(); } Console.WriteLine(); } }



LinkBack URL
About LinkBacks



.