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