[求助]怎样让程序继续执行选择,不退出,只有在接受某个按键时才退出呢?
int seng()
{int i,j;
for(i=1;i<=9;i++)
{for(j=1;j<=9;j++)
{printf("%2d*%d=%2d",i,j,i*j);
}
printf("\n");
}
}
int jia()
{int i,j;
for(i=1;i<=9;i++)
{for(j=1;j<=9;j++)
{printf("%2d+%d=%2d",i,j,i+j);
}
printf("\n");
}
}
int jian()
{int i,j;
for(i=0;i<=9;i++)
{for(j=i+1;j<=9;j++)
{printf("%2d-%d=%2d",j,i,j-i);
}
printf("\n");
}
}
main()
{int x,y;
printf("1、乘法口决表\n2、加法口决表\n3、减法口决表\n请选择:\n");
scanf("%d",&x);
switch(x)
{case 1: seng();break;
case 2: jia(); break;
case 3: jian();break;
}getch();
}