VC6.0问题求助
我自己写了一个程序要求用户输入一个字符就进行下一步接着在输入一个数字在进行一步,在vc6.0编译器上可以正常工作(WIN32 Debug),当是我把它组建成Release后问题就出现。开始输入字符可以到达下一步。可是当输入一个整数时就不能工作了。整个程序都结束自行关闭了。请问高手们,原因是什么啊?#include"stdio.h"
int main()
{
int b;
char a;
while(scanf("%c",&a)==1)
{
printf(" \n");
printf("\t Happy birthday!\n");
printf(" \n");
printf(" \t\t送个蛋糕你许个愿~~(*^__^*) \n ");
printf(" \n ");
printf(" iiiiiiiiii \n");
printf(" |:H:a:p:p:y:|\n");
printf(" __|___________|__\n");
printf(" |^^^^^^^^^^^^^^^^^|\n");
printf(" |:B:i:r:t:h:d:a:y:|\n");
printf(" | |\n");
printf(" ~~~~~~~~~~~~~~~~~~~~~ \n");
printf(" \n");
printf("\t ..------..\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");
break;
}
scanf("%d",&b);
switch(b)
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
printf("送首诗你~~(*^__^*)\n ");
printf(" \n");
printf(" \" 念恩爱厚深,\"\n");
printf(" \n");
printf(" \" 刘阮辞世尘.\"\n");
printf(" \n");
printf(" \" 文彩成礼乐,\"\n");
printf(" \n");
printf(" \" 华池落彩云.\"\n");
printf(" \n");
printf(" \n");break;
default:printf("→→想偷蕃薯啊~~~o(∩_∩)o \n");
}
printf(" \n");
printf(" 训觉觉咯~~~~希望你钟意 (*^__^*) \n");
printf(" \n");
printf("\t(按任意键退出程序)\n");
return 0;
}