/******************************************************/ /* Introduction to Programming */ /* By Dr. ANTF */ /* www.antf.net */ /* Copyright 2015 */ /* */ /* C# 332 - Problem 31: Drawing Lines */ /******************************************************/ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DOS { class Program { static void Main(string[] args) { int n; Console.Write("Please enter a number: "); n = int.Parse(Console.ReadLine()); Console.WriteLine("\n"); for (int i = 0; i < n; i++) { if (i % 3 == 0) for (int j = 0; j < 2; j++) Console.Write("*"); else if (i % 3 == 1) for (int j = 0; j < 5; j++) Console.Write("*"); else for (int j = 0; j < 3; j++) Console.Write("*"); Console.Write("\n"); } Console.ReadKey(); } } }