Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int n = int.Parse(Console.ReadLine());
- for (int i = 0; i < n / 2; i++)
- {
- string d1 = new string(' ', i);
- string d2 = new string(' ', n - 2 - 2 * i);
- Console.WriteLine(d1 + "x" + d2 + "x");
- }
- Console.WriteLine(new string(' ', n / 2) + "x");
- for (int i = n / 2 - 1; i >= 0; i--)
- {
- string d1 = new string(' ', i);
- string d2 = new string(' ', n - 2 - 2 * i);
- Console.WriteLine(d1 + "x" + d2 + "x");
- }
Advertisement
Add Comment
Please, Sign In to add comment