Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- class FirFree
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int outDots = n-2;
- int star = 1;
- int endStar = 1;
- int innerDots = n - 2;
- for (int i = 0; i < n-1; i++)
- {
- Console.Write(new string ('.',outDots));
- Console.Write(new string ('*',star));
- Console.Write(new string('.',innerDots));
- outDots--;
- innerDots--;
- star = star + 2;
- Console.WriteLine();
- }
- Console.Write(new string ('.',n-2));
- Console.Write(new string('*',endStar));
- Console.Write(new string('.', n - 2));
- Console.WriteLine();
- }
- }
Add Comment
Please, Sign In to add comment