using System;
using System.Linq;
class Program
{
public static void Main()
{
Console.WriteLine("Enter a word for reverse in C#");
string str = Console.ReadLine();
string reversestring = new string(str.ToCharArray().Reverse().ToArray());
Console.WriteLine("Reverse of entered string is : {0}",reversestring);
}
}
using System.Linq;
class Program
{
public static void Main()
{
Console.WriteLine("Enter a word for reverse in C#");
string str = Console.ReadLine();
string reversestring = new string(str.ToCharArray().Reverse().ToArray());
Console.WriteLine("Reverse of entered string is : {0}",reversestring);
}
}
No comments:
Post a Comment