用switch模拟实现售货机:
代码如下:
#define _CRT_SECURE_NO_WARNINGS 1
int main()
{
int b = 0;
char good[10][10] = {
"巧克力","奶油蛋糕","香葱饼干","雪碧 ","可乐"};
float price[] = { 5, 2.5, 4.5, 3, 3 };
printf("****<
用switch模拟实现售货机:
代码如下:
#define _CRT_SECURE_NO_WARNINGS 1
int main()
{
int b = 0;
char good[10][10] = {
"巧克力","奶油蛋糕","香葱饼干","雪碧 ","可乐"};
float price[] = { 5, 2.5, 4.5, 3, 3 };
printf("****<