#define _CRT_SECURE_NO_WARNINGS
#include "fun.h"
#include "array.h"
#define MAXNUM 100
char bibliography[MAXNUM][MAXNUM] =
{ "香辣鸡腿堡",
"劲脆鸡腿堡",
"新奥尔良烤鸡腿堡",
"老北京/墨西哥鸡肉卷",
"深海鳕鱼堡",
"田园脆鸡堡",
"川辣嫩牛五方",
"薯条(小份)",
"薯条(中份)",
"薯条(大份)",
"土豆泥",
"香甜粟米棒",
"上校鸡块(6块)",
"奥尔良烤翅",
"香辣鸡翅(对)",
"芙蓉鲜疏汤",
"可乐(小杯)",
"可乐(中杯)",
"可乐(大杯)",
"雪顶咖啡",
"牛奶",
"柠乐",
"热巧克力",
"圆筒冰激凌",
};
float price[MAXNUM] =
{ 12.50,
12.50,
13.50,
11.00,
13.50,
8.00,
14.00,
6.50,
7.50,
9.00,
3.50,
5.00,
11.00,
9.00,
8.00,
5.00,
5.50,
6.00,
7.00,
9.00,
5.00,
6.50,
5.00,
3.00 };
int main()
{
int i,j,n;
int kongge, dian;
int l = 24;
int dishNum;
float total=0.0;
showscreen(l,bibliography, price);
//printf("\t\t\t\t\t肯德基菜单\n");
//printf("\n\n");
//for (i = 0; i < l; i++)
//{
// printf("\t%d.",i+1);
// kongge= calculatekongge(i);
// for (j = 0; j < kongge; j++)
// {
// printf(" ");
// }
// printf("%s", bibliography[i]);
// dian= calculatedian(i, price, bibliography);
// for (j = 0; j < dian; j++)
// {
// printf(".");
// }
// printf("%.2f元\n", price[i]);
//}
//printf("\t点菜清单:");
for (i = 0,n=1;; i++)
{
scanf("%d",&n);
if (n == 0)
{
goto label1;
}
scanf("%d",&dishNum);
printf("%d. %s(%d份x%.2f元)= %.2f元\n", i+1, bibliography[n], dishNum, price[n], dishNum* price[n]);
total = total + dishNum * price[n];
}
label1:
printf("\t应付款:%.2f元", total);
return 0;
}
KFC.rar
需积分: 11 167 浏览量
2022-11-29
00:42:27
上传
评论
收藏 4KB RAR 举报
![avatar](https://profile-avatar.csdnimg.cn/cd30909ac94f4c3ea773d8d11079c3f2_weixin_75153299.jpg!1)
杰小瑞米
- 粉丝: 0
- 资源: 2
最新资源
- comment.block.documentation.rust
- there is no way to distinguish perfectly
- 数据库管理工具:dbeaver-ce-24.0.2-x86-64-setup.exe
- Objective-C.tmLanguage
- 数据库管理工具:dbeaver-ce-24.0.2-macos-x86-64.dmg
- Delphi 12 控件之StyleControls 5.77.7z
- 苹果CMSV10红色自适应网站模板
- 数据库管理工具:dbeaver-ce-23.3.5-stable.x86-64.rpm
- SAP 消息号C6013解决方案
- C#入门必看的实例程序100个,含全部源代码.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)