题目内容
判断一个字符串是否为回文(指从左至右和从右至左读都是一样的字符串)。#include #define N 11int main ( ){int i = 0, n = 0;char a [ N ] = " ";char * p1, * p2; printf ( "请输入小于%d位的整数: ",N-1 );scanf ( "%s", a );for (_______; (*p2) != ' \0 '; p2 ++ )n ++;p1 = a;p2 = a+n-1;for ( i = 1; p1 < p2; i ++ ){if (__________ )break;___________;___________;}if ( i > n / 2 )printf ( "Yes, %s是回文!\n", a );elseprintf ( "No, %s不是回文!\n", a );return 0 ;}
查看答案
搜索结果不匹配?点我反馈