嗨即时新在这里也是即时通讯新编程和id像你一样帮助我:问题是编译和运行程序后,它停止在它的中间运行和我不知道是什么原因造成这一点,比较遗憾的是无法读取以前的帖子: 这里是我的程序:C程序在运行中停止
char answer[15];
char place[15];
char fullname[15];
int age;
printf("What Is Your Full Name?: ");
scanf("%s",fullname);
printf("What Is Your Age?: ");
scanf("%d",age);
printf("Where Do You Live?: ");
scanf("%s",place);
if(strcmp(place,"gafsa")==0) {
printf("Aint a bad place you know");
}
else{
printf("hmmm %s cool\n",place);
}
printf("your name is %s, %d year old from %s is that right?: ",fullname,age,place);
scanf("%s",answer);
if(strcmp(answer,"yes")==0){
printf("you my friend are awesome\n");
}
else{
printf("you suck\n");
}
,这是清楚地表明了该问题的图像:
http://i.stack.imgur.com/yFTwK.png
你尝试调试? –
请打开你的编译器的警告并阅读它们。 – Mat
...和缩进 –