作了一首诗帮忙改一下做一下

麻烦大神帮我做一下这个程序,谢谢了,有急用,用C++语言,谢谢_程序员吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:65,739贴子:
麻烦大神帮我做一下这个程序,谢谢了,有急用,用C++语言,谢谢收藏
自动寄存柜某超市门口的自动寄存柜有n个寄存箱,并且有一个投币控制器,顾客想要寄存小件物品时,只要在投币控制器投入1个1元的硬币,如果此时有空闲的箱子,寄存柜就会自动打开一个空的箱子,并且打印输出一张小小的密码纸条;如果没有空闲的箱子,则提示“本柜已满”。当顾客离开超市时,用密码纸条上指定的数字密码依次输入到开箱控制器,则顾客所存包的箱子门就自动打开,顾客取走物品后,关上门。输入数据时,可先输入寄存箱总数n,再由用户选择是“投硬币”还是“输密码”。如果选择“投硬币”,则只有硬币值是1才开箱。如果有空闲的箱子,则输出箱子编号及密码(4位数字);如果无空闲的箱子,则提示:“本柜已满”。如果选择“输密码”,若输入的密码与某一箱子密码相符,则显示打开的箱子编号,否则输出提示:“密码错误”。请编写开箱控制程序实现上述过程。输入输出示例寄存箱总数:101.投硬币
0.退出 请选择: 1投币值:1寄存箱编号:1 密码:93421.投硬币
0.退出 请选择: 2输入密码:93421号寄存箱已打开1.投硬币
0.退出 请选择:0结束
这款游戏可以体验洪荒之力!我露出了迷之微笑
#include&stdio.h&#include&stdlib.h&#include&time.h&int main(void){
int n,i=0,coin,j,a,count=0,b;
int smima,z,c[80];
srand(time(NULL));
printf(&寄存箱总数:&);
scanf(&%d&,&n);do{
printf(&1.投硬币 2.输密码 0.退出\n请选择:&);
scanf(&%d&,&a);
switch(a){ case 1: printf(&投币值:&);
scanf(&%d&,&coin);
if(coin==1){
c[count]=rand()%n+1;
b=c[count];
c[count]=rand()%n+1;
b=c[count];
for(i=0;i&i++){
if(b==c[i]){
b=rand()%n+1;
z=rand()%;
printf(&寄存箱编号:%d 密码:%d\n&,b,z);
printf(&本柜已满\n&);}
case 2: printf(&输密码:&);
scanf(&%d&,&smima);
for(j=1;j&=n;j++)
if(z==smima){
printf(&%d号寄存箱已打开\n&,j);}
if(j==n+1)
printf(&密码错误\n&);
case 0: printf(&结束\n&);}}while(a==0);
return 0;}
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或JavaScript 一道作业题,帮忙做一下_百度知道
JavaScript 一道作业题,帮忙做一下
&#47, I am 2 years old,语法如下;var tom = new Person(&! &请写出构造函数Person的实现代码; jerry, 2);I am J
返回值! & , 12)构造函数Person用于构造人:function Person(name: var jerry = new Person(&quot, I am 12 years old: &quot: &Jerry&quot.introduce();
返回值.introduce();Tom&I am Tom, age){ / 函数体}使用范例如下
提问者采纳
unction Person(;}var p=new Person(&quot.write(str).introduce();alert(result);;+name+&, I am &Jerry&quot, age){};I am &+age+&quot!&quot.introduce=function(){
var str=&quot, 2);var result= p
提问者评价
太给力了,你的回答完美地解决了我的问题,非常感谢!
来自团队:
其他类似问题
为您推荐:
其他1条回答
Person(+name+&&&&am&&+age+&&&years&&&&&nbspfunction&I&&I&&&&old&am&;&};&&nbsp,&age){&nbsp.introduce=function(){&&&&return&nbsp
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁要考试了,求大神帮忙做一下_沈阳大学吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
要考试了,求大神帮忙做一下收藏
I. 单选1. The years he spent in the countryside proved to be a(n)
experience.
B) rewarding
C) rewardless
D) rewarded2. Over a third population was estimated to have no
to health service.
D) accede3. He has made a(n)
remark that angers all of us.A) offense
B) offensive
C) offended
D) offending4. You will have to
yourself to a completely new life.
A) coordinate
B) subject
D) adjust5. I deeply
to inform you that we cannot accept such conditions.
B) regress
D) regulate6. Although my chance
with this famous artist was 30 years ago, I still remember it.
A) encounter
C) valuable
D) worth7. In a formal interview, you should always try to maintain good eye
with the interviewers.
A) connections
B) contacts
C) touches
D) combinations8. My sister has really been
since she lost her job.
A) despairing
B) dimpled
C) disappointed
D) depressed9. Though he worked very hard, it took him a long time to
the skills.
A) acquire
B) establish
D) cultivate 10. At the airport, people stood behind a metal fence waiting for passengers to
from customs. A) occur
D) submerge 11. Some questions seem obvious but others seem
and hard to answer.A) peculiar
B) characteristic
C) distinct
D) individual 12.
exposure to sunlight is .harmful to the skin.
A) Uninterrupted
B) Continuous
C) Interval
D) Intervallic13. In Britain, packets of cigarettes come with a government health warning
to them. A) fastened
B) combined
C) attached
D) tied14. Police are looking for a man who
and killed the drugstore owner.
D) roped15. The husband spent all his money
his wife saved her money for the family.
D) as16. It was an exciting game
no goals were scored.
A) even though
B) even if
C) as though
D) as if17. The young man listening to music all the time
A) while was working
B) while he working
C) while working
D) while worked18. Either you or Tom
suitable for the job.A) are
D) is19. His reaction make impossible further
with him.A) communicate
B) communicating
C) communicated
D) communication20. He won a gold medal,
the whole family considered a great honor.A) which
D) what21. They all agree that for the law is the very
of civilized society.
A) organization
B) constitution
C) underpinning
D) foundation22. People know that babies cry by
when they are hungry.
A) feeling
B) instinct
C) intuition
D) sense23. He should be polite enough not to
about what he has achieved.A) boast
D) cry24. People who want to get rid of old cars sometimes
them in the woods.
B) retreat
C) collect
D) dump25. The spread of international crime and corruption
a major treat to the global economy.
B) constitute
C) represent
D) compose26. Each of us might
the concept of freedom in a slightly different way.
A) describe
B) delimit
D) delineate27. He
himself by listening to his favorite songs.
A) lessened
B) slackened
C) relaxed
D) loosened28. We decided to paint the doors blue to
the walls.
B) compare
D) unite 29. The young couple
about the high cost of visiting Europe.
A) completed
B) complained
C) complimented
D) competed 30. He showed great
in signing the agreement. A) enthusiasm
B) eagerness
C) reluctance
D) excitement31. If the bike
to you that much, why not buy it?A) appeals
B) appalls
C) appears
D) appeases 32. He managed to hide his
and moved to a new town where people would not know him.
A) address
B) mailbox
C) massage
D) identity33. Don’t just complain about what’ suggest some
ways to solve the problem.
A) negative
B) positive
C) neutral
D) natural34. He couldn’t join the police because he was below the
height allowed by the rules.
A) minimum
B) maximum
D) moderate35.
lose all money, but we also came close to losing our lives.
A) Not did we only
B) Not we did only
C) Not only did we
D) Not only we did36. Kate saw her brother Bill
she was getting off the bus.
D) for37. The problem was a continuous worry to me
大学生们注意啦!一大批流量来袭!现办理4G飞享套餐,每月返1GB,畅刷不停!
在会的吗,帮帮
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或请大家帮忙做一下这道完形填空十分感谢!&
RosE情义鍤晓°
原文全文如下:No leaves are exactly the same in the world.Nobody in the world is the same AS you.You are unique.Everybody is DIFFERENT from others.That is good:BECAUSE it makes the world an interesting place.There are people taller than you,but others are SHORTER than you.Maybe your hair is the same color as your friend's,but it MAYBE longer than hers.I am sure you have SOME friends who are SMARTER than you.And you also have some friends around you who are not GOOD at some things.HOW does your best friend look like?Do you both LIKE to finish your homework at school?Do you both want to wear the same clothes every day?I think IN some ways you are the same,but in many other ways you are different.So say loudly to the world,“I am unique."
为您推荐:
其他类似问题
扫描下载二维码}

我要回帖

更多关于 作了一首诗帮忙改一下 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信