write a program to print Pyramid
For example:
Input:
3
Output:
*
* *
* * *
Solution:
using System;
namespace palindromecheck
{
class Program
{
public static void Main()
{
Console.WriteLine("Enter a number:");
var rows = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i < rows; i++)
{
for (int k = 0; k <= i; k++)
{
Console.Write("*\t");
}
Console.WriteLine();
}
Console.ReadLine();
}
}
}