Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int numAsteriskAndDashes = n-2;
- int numberAsteriskPlusLine = n-1;
- for (int row =1; row<= n-2; row++)
- {
- if (row%2==1)
- {
- Console.WriteLine("{0}\\ /{0}",new string('*',numAsteriskAndDashes ));
- }
- else
- Console.WriteLine("{0}\\ /{0}",new string('-',numAsteriskAndDashes ));
- }
- Console.WriteLine(new string(' ', numberAsteriskPlusLine) + '@' +new string(' ', numberAsteriskPlusLine) );
- for (int row =1; row<= n-2; row++)
- {
- if (row%2==1)
- {
- Console.WriteLine("{0}/ \\{0}",new string('*',numAsteriskAndDashes ));
- }
- else
- Console.WriteLine("{0}/ \\{0}",new string('-',numAsteriskAndDashes ));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement