如何为begginers的餐厅编写程序 [英] How to write program for restaurant for begginers

查看:74
本文介绍了如何为begginers的餐厅编写程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您被其中一家着名酒店聘用开发一个系统,以方便用户购买食品和在线支付账单,这可以节省管理和客户的时间。用户还可以获得酒店的会员资格,通过该会员他/她将获得一些折扣。设计一个餐厅系统,用户可以从下面的菜单中订购多种食品:

1.按某物品换食物

a)按某物品购买Nasi Lemak

b)按某物购买Roti Canai

c)按某物品购买Spaghetti

d)按某物品买鸡肉烤

2.按某种饮料/饮料

a)按某物品买茶

b)按某物品买可乐

c)按东西买大豆

d)按某物购买橙汁



然后,用户可以在他/她的信用卡中输入姓名和余额。如果他/她具有期望的平衡,用户还可以购买多种食物/饮料。如果用户是酒店的会员,那么系统应该给予20%的折扣。最后在总账单上增加6%的消费税,并从信用卡中扣除资金。 (提示:使用结构来声明所有变量和函数以显示菜单)



我尝试过:



nothing.no idea.im新程序员

解决方案

我们不做你的功课:这是有原因的。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。



亲自尝试,你可能会发现它不是和你想的一样困难!

首先仔细阅读问题,然后阅读你的课程说明到目前为止 - 你需要的信息将在其中。



如果您遇到特定问题,请询问相关问题,我们会尽力提供帮助。但是我们不会为你做这一切!


开始阅读一些介绍性材料。退房,例如 C ++基本输入/输出 [ ^ ]

尝试用最少的菜单编写一个简单的应用程序。

如果你遇到困难,然后在这里提出具体的问题。


最好学习编程你看一些 Youtube教程



当您对编码有一些想法,而不是以可编码单位分割您的任务,比如打印一些文本和scanf 用户输入:

 printf( 菜单\ n ---- \ n这里有菜单......); 
int choice = 0 ;
scanf( %d,& choice);


You are hired by one of the famous hotel to develop one system to facilitate their user to buy food Items and pay bills online which can save the time of both management and customers. User can also get a membership of the hotel through which he/she will be able to get some discounts. Design a system for a restaurant in which users can order multiple food items from the following menu:
1. Press something for Food
a) Press something to buy Nasi Lemak
b) Press something to buy Roti Canai
c) Press something to buy Spaghetti
d) Press something to buy Chicken Grilled
2. Press something for Drink/Beverages
a) Press something to buy Tea
b) Press something to buy Coke
c) Press something to buy Soy
d) Press something to buy Orange Juice

Then, user can enter name and their balance in his/her credit card. User also can buy multiple food/drink if he/she has desired balance. If user is a member of the hotel then system should give 20% discount. At the end add 6% GST on total bills and deduct money from credit card. (Hint: used structure to declare all the variables and function to display menu)

What I have tried:

nothing.no idea.im a new programmer

解决方案

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!
Start by reading the question carefully, and then read your course notes so far - the information you need to get started will be in them.

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!


Start reading some introductory material. Check out, for instance C++ Basic Input/Output[^]
Try to write a simple application with a minimal menu.
If you get stuck, then ask specific questions here.


Learn programming at best you watch some Youtube tutorials.

When you have some ideas about coding than split your tasks in codeable units like print some text and scanf user input:

printf("Menu\n----\nHere comes the menu ...");
int choice = 0;
scanf("%d", &choice);


这篇关于如何为begginers的餐厅编写程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆