标点符号包括(@#%+_";/|……)等,再说一下,如果要判断输入的汉字是:小刘好,那么只要输入的不是这三个字,提示输入错误,请再次输入,只有全对了,才输出:你的信息以确认(这些字可随便改),写好后希望给程序详细的分析,分析!!这个我不会想学学,要能在VC++上运行哟!希望那位有多余时间的给我写写好吗?谢谢!!
咱了有一点不对呀???error C2065: 'true' : undeclared identifier
追答#include
#include
#include
#include
int main()
{
char s[100];
while(1)
{
gets(s);
if(strcmp(s,"小刘好")==0)break;
}
puts("你的信息以确认");
return 0;
}
/*
*/
如果想加入一句提示:printf("你输入有误请重新输入:\n"); 咱加呀?加在那里呀??
追答#include
#include
#include
#include
int main()
{
char s[100];
while(1)
{
gets(s);
if(strcmp(s,"小刘好")==0)break;
printf("你输入有误请重新输入:\n");
}
puts("你的信息以确认");
return 0;
}
/*
*/