Saturday, April 16, 2005

String Reverse without using reverse key word in C#

using System;
public class Entrance
{
public static void Main()
{
string str = "sankar";
Console.WriteLine(str.Length);
for(int i=str.Length-1;i>=0;i--)
{
Console.Write(str.Substring(i,1));
}
Console.ReadLine();
}
}

No comments: