class Program
{
static void Main(string[] args)
{
string str = "", reverse = "";
str = "honesty is the best policy";
int num = str.Length - 1;
while (num >= 0)
{
reverse = reverse + str[num];
num--;
}
Console.WriteLine(reverse);
Console.ReadLine();
}
}
No comments:
Post a Comment