本文介绍了我如何改变号码。如果没有房间的话。客人超过6位客人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在用C ++制作一张酒店登记表格,要求用户插入一些客人..而且我有一个条件,即每个房间最多6位客人。因此,如果用户输入超过6位客人,则房间数量更改为2.或超过12位客人,房间数量更改为3. 我尝试了什么: 我无法得到逻辑。I am making a Hotel Check In Form in C++ , whick ask the user to insert No. of Guests ..and I have a condition i.e. Max 6 guests per room. So, if the user enter more than 6 guests the No. of Room changes to 2. Or more than 12 guests the No. of room change to 3.What I have tried:I am not able to get the logic.推荐答案 每间客房最多6位客人是您的商务规则,但不一定是客人想要的,他们可能更愿意预订更多房间,即使他们少于6人。检查你的设计。首先询问房间数量 - >那么每个房间的客人数量(可以考虑年龄)(控制从0到6的数字范围)等。查看一些酒店预订网站的线索。Max 6 guests per room is your business rule but not necessary what the guests want, they may prefer to book more rooms for more space even they are fewer than six. Review your design. Start by asking for number of rooms -> then number of guests (may consider age) for each room (control the range of numbers allowable from 0 to 6) etc. Check out some of the hotel booking sites for clues. 这篇关于我如何改变号码。如果没有房间的话。客人超过6位客人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-22 14:16