一个新手编了很久的程序出了问题
程序代码:
#include<stdio.h> #include<stdlib.h> #include<conio.h> main() { int a,b,e;char g,d,f; printf("..............................................................................................................\n"); printf("| 欢迎来到草泥马草原! |\n"); printf("..............................................................................................................\n"); printf("\n\n\n"); printf("任意键继续\n"); getche(); system("cls"); printf("现在请你输入你的身份证号码,以便我们验证你的身份....\n"); scanf("%d",&a); printf("__\n"); system("cls"); printf("稍等.......\n"); for(b=0;b<=100;b++) { printf("nhvhjvnrjnvhudhvkjnvjkheejnf hu h grjkhmng jwnh672644472 jbfdf sbf bb d12y jd fb sdbjin hgh................\n\n");} printf("经验证,你是我们草原的常客\n\n"); getche(); system("cls"); printf("你有事没事都会来草泥马草原骑马\n\n"); getche(); printf("对不对?\n"); getche(); printf("Input \"Y\" or \"N\",please"); scanf("%c",g); getche(); switch(g) {case'Y':printf("好,那就对了,再次欢迎您的到来,\n请问您今晚看上哪头马?\n好,不用着急,让我为您一一罗列....\n");break; case'N':{printf("那就很遗憾了,你是冒充的吧?\n不过也没关系,我们草泥马草原是非常好客的,只要你有钱,只要你够壮,只要你有胆,我们随时欢迎你的光临\n"); getche(); printf("请问,在今晚这个夜黑风高而且又是大光棍节的晚上,你想来我们草原逛逛吗?\n"); printf("想的话请输入\"Y\",不想的话请输入\"N\"\n"); scanf("%c",&d); if(d=='Y') break;else printf("那真的很遗憾,同样祝你光棍节快乐!\n");break;} default: printf("不好意思,你的回答有点..DB+SB哦!\n"); } if (d=='Y') { printf("我们这里的马子有很多种...\n"); getche(); printf("有肥的,有瘦的,有高的,也有矮的。只要你想要的,我们这里都有...\n"); getche(); printf("你问我肥瘦高矮究竟是咋样?那我就告诉你吧\n"); getche(); printf("高的是这样的............................\n\n\n\n\n"); printf(" ......\n"); printf(" ........ .\n"); printf(" .............\n"); printf(" . . \n"); printf(" . $ $ .\n"); printf(" . ! ..\n"); printf(" ---+++++.\n"); printf(" ||||\n"); printf(" ........\n"); printf(" ...........\n"); printf(" ...........................\n"); printf(" .........................\n"); printf(" .......................\n"); printf(" ....................\n"); printf(" ................\n"); printf(" ............\n"); printf(" .........\n"); printf(" ......\n"); getche(); system("csl"); printf("矮的是这样的..............................\n\n\n\n\n"); printf(" @\n"); printf(" -|-\n"); printf(" / \\\n"); getche(); system("csl"); printf("肥的是这样的..............................\n\n\n\n\n"); printf("你想象下如花,旁边的胖妞吧!嘻嘻\n"); getche(); system("csl"); printf("瘦的是这样的.................................\n\n\n\n\n"); printf("\t其实就是如花她妹,似玉。现在她正忙着呢,没空过来啦,要的话明天帮你留着\n"); printf("好啦,介绍完了,接下来,就是答问题时间了。\n"); printf("因为人太多了,我们四大美马应接不暇,只好让聪明人先体验啦\n"); getche(); printf("相信你已经等不及了吧,好,那请认真听第一题:\n"); getche(); printf("请问刘凯彬的生日是几月几日,按20111111的格式输入:\n"); scanf("%d",&e); if(e==19910210) printf("太感动了,你答对啦,记得送礼物哦,接下来请看第二道题:\n"); else printf("哎,你怎么连大名鼎鼎的刘先生都不了解啊,快滚!!\n");goto loop; printf("请在10秒内翻开C语言课本的第164页看到第13行第一个数字是什么?\n"); f=getchar(); if(f==1) printf("你很聪明,如花爱上你了,你可以去享受了,嘻嘻\n"); else goto loop; } loop:printf("\n\n\n"); printf(" 0 000\n"); printf(" 00 000\n"); printf(" 000 000000000000000000000000\n"); printf(" 00 000000000000000000000000\n"); printf(" 0 0\n"); printf(" 0 00 00\n"); printf(" 000 000 0 000\n"); printf(" 0000 00 000\n"); printf(" 0000 0000\n"); printf(" 000 00000 00 \n"); printf(" 00 000000000000000000\n"); printf(" 0 00000000000000000000\n"); printf(" 000 00000000000000000000\n"); printf(" 0000 0000\n"); printf(" 0000 0000\n"); printf(" 00000 0000 \n"); printf(" 00000 0000000 00 00\n"); printf(" 0000 0000000000 00000 \n"); printf(" 000 000000 00000 0000 00\n"); printf(" 0000 0 0000 00000 000 0000 \n"); printf(" 0000000 000 00000000 00000\n"); printf(" 0000 0 00000000 000000\n"); printf(" 00 0 00000000 000000 \n"); }在“对不对”之后无论输入什么都输出一样的结果