using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace trn
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("enter a number");
int n = Int32.Parse(Console.ReadLine());
for (int i = n; i >= 1; i--)
{
for (int j = 1; j <= (i - 1); j++)
{
Console.Write(" ");
}
for (int j = i; j <= n; j++)
{
Console.Write(j + " ");
}
Console.WriteLine();
}
Console.ReadLine();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace trn
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("enter a number");
int n = Int32.Parse(Console.ReadLine());
for (int i = n; i >= 1; i--)
{
for (int j = 1; j <= (i - 1); j++)
{
Console.Write(" ");
}
for (int j = i; j <= n; j++)
{
Console.Write(j + " ");
}
Console.WriteLine();
}
Console.ReadLine();
}
}
}
No comments:
Post a Comment