static void Main(string[] args)
{
Console.WriteLine("Enter no ");
int cnt = int.Parse(Console.ReadLine());
int iCnt = cnt;
int iDisplay = cnt;
for (int i = 1; i <= cnt; i++)
{
if (i % 2 != 0)
iDisplay = iCnt;
else
iDisplay = 1;
for (int j = iCnt; j > 0; j--)
{
if (i % 2 != 0)
{
Console.Write(iDisplay + " ");
iDisplay--;
}
else
{
Console.Write(iDisplay + " ");
iDisplay++;
}
}
iCnt--;
Console.WriteLine();
}
Console.ReadLine();
}
static void Main(string[] args)
{
Console.WriteLine("Enter string : ");
string strLabel= Console.ReadLine();
for (int i = 0; i < strLabel.Length; i++)
{
Console.Write(strLabel[i]);
if (i < strLabel.Length-1)
Console.Write(" $ ");
}
Console.ReadLine();
}
Thanks and Regards,
Jaydeep Choudhari
Kind Regards,
Jay
Gokul, if this helps please login to Mark As Answer. | Alert Moderator