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 RomboidStars
- {
- class RomboidStarsMain
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- for (int i = 1; i <= n; i++)
- {
- Console.Write(new string(' ', n - i)); // drawing the upper part using that n is static and i is increasing
- Console.Write('*');
- for (int j = 1; j < i; j++)
- {
- Console.Write(" *");
- }
- Console.WriteLine();
- }
- for (int i = 1; i < n; i++)
- {
- Console.Write(new string(' ', i)); //drawing the bottom part using that n is static and i is increasing
- Console.Write('*');
- for (int j = 1; j < n-i; j++)
- {
- Console.Write(" *");
- }
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment