using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Floyd
{
class Program
{
static void Main(string[] args)
{
int n, i, j;
string s;
Console.WriteLine("Enter The Row Value..");
n = int.Parse(Console.ReadLine());
Console.WriteLine("Enter The String..");
s = Console.ReadLine();
for (i = 0; i <= n; i++)
{
for (j = 0; j <i; j++)
{
Console.Write(" " +s[j]);
}
Console.WriteLine(" ");
}
Console.ReadLine();
}
}
}
No comments:
Post a Comment