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 RombStars
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int row, col;
- for (row = 1; row<=n; row++)
- {
- for (col = 1; col <= n - row; col++)
- Console.Write(" ");
- Console.Write("*");
- for (col = 1; col < row; col++)
- Console.Write(" *");
- Console.WriteLine();
- }
- for (row = n-1; row >=1; row--)
- {
- for (col = 1; col <= n - row; col++)
- Console.Write(" ");
- Console.Write("*");
- for (col = 1; col < row; col++)
- Console.Write(" *");
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement