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 RhombusOfStarsV2
- {
- class RhombusOFStarsV2
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- for (int row = 0; row < n; row++)
- {
- for (int space = row; space < n-1; space++)
- {
- Console.Write(" ");
- }
- for (int star = 0; star <= row; star++)
- {
- Console.Write("* ");
- }
- Console.WriteLine();
- }
- for (int row = 0; row < n-1; row++)
- {
- for (int space = 0; space < row; space++)
- {
- Console.Write(" ");
- }
- for (int star = row; star < n-1;star++)
- {
- Console.Write(" *");
- }
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment