Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _06._Rhombus_of_Stars
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- int parameters = int.Parse(Console.ReadLine());
- int f = 0;
- for (int row = 1; row <= parameters; row++)
- {
- for (int n = 1; n <= parameters - f; n++)
- {
- Console.Write(" ");
- }
- Console.Write("*");
- for (int n = 1; n < row; n++)
- {
- Console.Write(" *");
- }
- Console.WriteLine();
- f++;
- }
- int startt = parameters - 1;
- f -= 2;
- for (int row = startt; row > 0; row--)
- {
- for (int i = 1; i <= parameters-f; i++)
- {
- Console.Write(" ");
- }
- Console.Write("*");
- for (int i = 1; i < row; i++)
- {
- Console.Write(" *");
- }
- Console.WriteLine();
- f--;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement