Design an algorithm for an automatic teller machine that dispenses money. The user should enter the amount desired (a multiple of ten dollars) and the machine dispenses this amount using the least number of notes. The notes dispensed are $100, $50, $20, and $10.
Your algorithm should determine and print how many each kind of note to dispense. Provide your answers using a defining diagram and pseudocode. Write test data would you use to test this algorithm?
我不会做啊,,甚至题目都看不懂。。。。谁帮帮偶把代码写出来啊。。谢了。
chiyb 于 2010-04-26 02:29:15发表:
shuqq105 于 2010-03-16 23:08:39发表:
找一个范围,做一个循环嵌套,一个一个的试,找出所有满足条件的整数吧。
我只知道一点点的C……
dragonballz52 于 2010-03-16 17:06:11发表:
我说的看不懂不是英文。。。是不知道怎么把题目编程啊。。。。
shuqq105 于 2010-03-15 21:11:12发表:
题目大意好像是把整钱换成零钱,输入一个整十的大数,分解为100,50,20,10组成的小数。
基本是Num=100*i+50*j+20*k+10*m,i,k,j,m都是整数。
skf1985111 于 2010-03-14 19:27:31发表:
哥们 你来错地方了吧 :0wpoi2 这里不是编程区