Advertisement
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;
- namespace ConsoleApplication7
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Unesite broj redova zvjezde: ");
- int n = int.Parse(Console.ReadLine());
- for (int i = 1; i <= n; i++)
- {
- for (int j = -1; j <= n * 2+1; j++)
- {
- if (j <= n / 2 - i || j >= n / 2 + i) Console.Write(" ");
- else Console.Write("*");
- }
- Console.Write("\n");
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement