int main2()
{
system("cls");
printf("main2()函数执行测试\n");
getch();
}
int guanyu()
{
system("cls");
printf("制作人信息\n");
getch();
}
int main()
{
int i=2;
char c;
system("cls");
gotoxy(1,3);
printf(" 1.开始");
gotoxy(1,6);
printf(" 2.关于");
gotoxy(1,9);
printf(" 3.退出");
gotoxy(1,2);
printf(" ┏━━━┓\n");
printf(" ┃\n");
printf(" ┗━━━┛\n");
gotoxy(35,3);
printf("┃");
xh:for(;;)
{
c=getch();
if(c=='1')
{
gotoxy(1,i);
printf(" \n");
printf(" \n");
printf(" \n");
gotoxy(35,i+1);
printf(" ");
i=2;
gotoxy(1,i);
printf(" ┏━━━┓\n");
printf(" ┃\n");
printf(" ┗━━━┛\n");
gotoxy(35,i+1);
printf("┃");
}
if(c=='2')
{
gotoxy(1,i);
printf(" \n");
printf(" \n");
printf(" \n");
gotoxy(35,i+1);
printf(" ");
i=5;
gotoxy(1,i);
printf(" ┏━━━┓\n");
printf(" ┃\n");
printf(" ┗━━━┛\n");
gotoxy(35,i+1);
printf("┃");
}
if(c=='3')
{
gotoxy(1,i);
printf(" \n");
printf(" \n");
printf(" \n");
gotoxy(35,i+1);
printf(" ");
i=8;
gotoxy(1,i);
printf(" ┏━━━┓\n");
printf(" ┃\n");
printf(" ┗━━━┛\n");
gotoxy(35,i+1);
printf("┃");
i=8;
}
if(c==32)
{
if(i==2)
{
main2();
system("cls");
main();
}
if(i==5)
{
guanyu();
system("cls");
main();
}
if(i==8)
return 0;
}
}
}
为什么执行前两步之后,退出就失灵了?
别重新给我写,有些代码老师没教不能用!!