#include <stdio.h>
#include <stdlib.h>
int main()
{
int op;
while (1){
printf ("---------Menu---------\n");
printf ("----Sell----------1\n");
printf ("----Buy-----------2\n");
printf ("----ShowProduct—3\n");
printf ("----Out-----------0\n");
scanf ("%d", &op);
switch(op){
case 1:
printf (“Selling the product\n”);
break;
case 2:
printf (“Buy the product\n”);
break;
case 3:
printf (“checking the store\n”);
break;
case 0:
printf (“the Program is out\n”);
exit(0);
default:
printf (“Please reinput the operation\n”);
}
}
return 0;
}
菜单循环
最新推荐文章于 2021-08-09 13:03:12 发布