Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Console.Write("Enter a value for l: ");
- String input = Console.ReadLine();
- Console.Write("Enter a value for h: ");
- String input2 = Console.ReadLine();
- int h = int.Parse(input);
- int l = int.Parse(input2);
- int space = h - 1;
- for (int i = 0; i < h; i++)
- {
- //for (int j = space; j > 0; j--)
- for (int j = 0; j < space; j++)
- {
- Console.Write(" ");
- }
- for (int j = 0; j < i; j++)
- {
- Console.Write("*");
- }
- space--;
- Console.WriteLine();
- }
- Console.ReadKey();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement