2016-05-26 14:05发布
在WIN-TC下编译无措
#include<stdio.h>int main(){
char a[10]="huangyong",b[10];
while(1) { printf("whats my name? "); scanf("%s",b); if(strcmp(a,b)==0) { printf("please enter anykey to nextn "); break; } else { printf("Srroy,wrong answer!");
} } getch();}
最多设置5个标签!
在WIN-TC下编译无措
#include<stdio.h>
int main()
{
char a[10]="huangyong",b[10];
while(1)
{
printf("whats my name? ");
scanf("%s",b);
if(strcmp(a,b)==0)
{
printf("please enter anykey to nextn ");
break;
}
else
{
printf("Srroy,wrong answer!");
}
}
getch();
}
一周热门 更多>