KFC点餐系统(未完善)

#include <iostream>
#include <string>
#include <conio.h> // 注意:这仅在Windows中有效
#include <windows.h>
#include <cstdlib>
#include <ctime>
#include <iomanip>
using namespace std;
int main(){
	while(true){
		float money;
		int k1,k2,k3,k4,k5,k6,k7,k8,k9; 
		cout<<" ____________________________________________"<<endl;
		cout<<"| KFC                                        |"<<endl;
		cout<<"|点餐系统1.0                                 |"<<endl;
		cout<<"| 饮料:                                     |"<<endl;
		cout<<"| #.可乐 Z 12元 X                            |"<<endl;
		cout<<"| #.雪碧 C 12元 V                            |"<<endl;
		cout<<"| 小食:                                     |"<<endl; 
		cout<<"| #.薯条 大 K 10元             J             |"<<endl;
		cout<<"| #.蛋挞 1加入购物车+1 q 5元                 |"<<endl;
		cout<<"| 汉堡:                                     |"<<endl;
		cout<<"| #.麦辣鸡腿堡 19.9元 F 限时秒杀  G          |"<<endl;
		cout<<"| #.鳕鱼堡  O 16元 P                         |"<<endl;
		cout<<"| 套餐:                                      |"<<endl;
		cout<<"| #.1早饭(米粥+鸡蛋堡+沙拉)22元 R加入购物车|"<<endl;
		cout<<"| #.2午饭(牛肉堡+蔬菜汤+雪碧)42元 T        |"<<endl;
		cout<<"| #.3晚饭(鳕鱼堡(单)+土豆泥+拉丝芝士 30元Y  |"<<endl;
		cout<<"|套餐不可以取消                              |"<<endl;
		cout<<"|____________________________________________|"<<endl; 
		while (!_kbhit()) {
        }

    
        char input = _getch();
		switch(input){
			case 'z':
				cout<<"12+"<<endl;
				money+=12;
				k1++;
				system("cls");
				break;
			case 'c':
				cout<<"12+"<<endl;
				system("cls");
				money+=12;
				k2++;
				break;
			case'k':
				cout<<"10+"<<endl;
				system("cls");
				money+=10;
				k3++;
				break;
			case'1':
				cout<<"5+"<<endl;
				system("cls");
				money+=5;
				k4++;
				break;
			case'f':
				cout<<"19.9"<<endl; 
				system("cls");
				money+=19.9;
				k5++;
				break;
			case'o':
				cout<<"16+"<<endl;
				system("cls");
				money+=16;
				k6++;
				break;
			case'r':
				cout<<"22+"<<endl;
				system("cls");
				money+=22;
				k7++;
				break;
			case't':
				cout<<"42+"<<endl;
				system("cls");
				money+=42;
				k8++;
				break; 
			case'y':
				cout<<"30+"<<endl;
				system("cls");
				money+=30;
				k9++;
				break;
			case'm':
				system("cls");	
				cout<<"付钱:"<<money<<endl;
				Sleep(2000);
				cout<<"支付成功"<<endl;
				//return 0;
				
		}
		system("cls");
	}
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值