Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Butterfly
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- // using ?: operator https://msdn.microsoft.com/en-us/library/ty67wk28.aspx
- for (int i = 0; i < n - 2; i++)
- {
- Console.WriteLine("{0}\\ /{0}", new string(i % 2 == 0 ? '*' : '-', n - 2));
- }
- Console.WriteLine(new string(' ', n - 1) + "@");
- for (int i = 0; i < n - 2; i++)
- {
- Console.WriteLine("{0}/ \\{0}", new string(i % 2 == 0 ? '*' : '-', n - 2));
- }
- }
- }
Add Comment
Please, Sign In to add comment