Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Trapezoid
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- Console.WriteLine("{0}{1}",new string('.', n),new string('*', n));
- int outputDots = n-1;
- int stars = 1;
- int innerDots = n-1;
- for (int i = 0; i < n - 1; i++)
- {
- Console.Write(new string('.', outputDots));
- Console.Write(new string('*', stars));
- Console.Write(new string('.', innerDots));
- Console.Write(new string('*', stars));
- outputDots--;
- innerDots++;
- Console.WriteLine();
- }
- Console.WriteLine(new string('*', n * 2));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement