using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string a;
a=Console.ReadLine();
int len = a.Length-1;
int x,y;
for (x = 0,y = len - x; x <= (len+1)/ 2; ++x,--y)
{
if (a[x]!=a[y])
{
Console.WriteLine("不是回文");
break;
}
}
if(x>=y)
{
Console.WriteLine("是回文");
}
Console.ReadKey();
}
}
}
运行结果: