Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace gt
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = double.Parse(Console.ReadLine());
- for (int rolesUp = 1; rolesUp <= n; rolesUp++)
- {
- for (int spaces = 0; spaces < n - rolesUp; spaces++)
- {
- Console.Write(" ");
- }
- for (int starsUp = 0; starsUp < rolesUp; starsUp++)
- {
- Console.Write("* ");
- }
- Console.WriteLine();
- }
- // DOWN........
- for (int rollesDown = 1; rollesDown <= n -1; rollesDown++)
- {
- for (int spacesDown = 0; spacesDown < rollesDown; spacesDown++)
- {
- Console.Write(" ");
- }
- for (int starsDown = 0 ; starsDown < n - rollesDown ; starsDown++)
- {
- Console.Write("* ");
- }
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment