//判断输入s所指的字符串是不是回文,若是输出“yes”,否则输出“no”
using System;
namespace huiwen
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("enter your string:");
String s=Console.ReadLine();
int i;
for (i = 0; i <=s.Length / 2; i++)
{
if (s[i] != s[s.Length-i - 1])
break;
}
if(i<s.Length/2)
{
Console.WriteLine("no");
}
else
{
Console.WriteLine("yes");
}
Console.ReadKey();
}
}
}
using System;
namespace huiwen
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("enter your string:");
String s=Console.ReadLine();
int i;
for (i = 0; i <=s.Length / 2; i++)
{
if (s[i] != s[s.Length-i - 1])
break;
}
if(i<s.Length/2)
{
Console.WriteLine("no");
}
else
{
Console.WriteLine("yes");
}
Console.ReadKey();
}
}
}