Advertisement
xandria1

Untitled

Aug 25th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. using System;
  2.  
  3. public class Program
  4. {
  5. public static void Main()
  6. {
  7.  
  8. int n = int.Parse(Console.ReadLine());
  9. int numAsteriskAndDashes = n-2;
  10.  
  11. int numberAsteriskPlusLine = n-1;
  12.  
  13.  
  14.  
  15. for (int row =1; row<= n-2; row++)
  16. {
  17. if (row%2==1)
  18. {
  19. Console.WriteLine("{0}\\ /{0}",new string('*',numAsteriskAndDashes ));
  20. }
  21. else
  22. Console.WriteLine("{0}\\ /{0}",new string('-',numAsteriskAndDashes ));
  23. }
  24.  
  25.  
  26. Console.WriteLine(new string(' ', numberAsteriskPlusLine) + '@' +new string(' ', numberAsteriskPlusLine) );
  27.  
  28. for (int row =1; row<= n-2; row++)
  29. {
  30. if (row%2==1)
  31. {
  32. Console.WriteLine("{0}/ \\{0}",new string('*',numAsteriskAndDashes ));
  33. }
  34. else
  35. Console.WriteLine("{0}/ \\{0}",new string('-',numAsteriskAndDashes ));
  36. }
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement