public static void Main(string[] args)
{
Console.Write("Enter a number: ");
int n = Convert.ToInt32(Console.ReadLine());
Console.WriteLine();
for (int i = 1; i < n; i++)
{
for (int j = 1; j <= i; j++)
Console.Write(j.ToString());
Console.WriteLine();
}
for (int i = n; i >= 0; i--)
{
for (int j = 1; j <= i; j++)
Console.Write(j.ToString());
Console.WriteLine();
}
Console.WriteLine();
Console.ReadLine();
}
Subscribe to:
Post Comments
(
Atom
)
Post Top Ad
Author Details
Templatesyard is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design. The main mission of templatesyard is to provide the best quality blogger templates.
No comments