文件名称:coin
- 所属分类:
- 系统编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2015-05-12
- 文件大小:
- 694kb
- 下载次数:
- 0次
- 提 供 者:
- 小*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
硬币找钱问题
设有6种不同面值的硬币,各硬币的面值分别为5分、1角、2角、5角、1元和2元。现在要用这些面值的硬币来购物和找钱。购物时可以使用的各种面值的硬币个数存于数组Coins[1:6]中,假设商店里各面值的硬币有足够多。对于给定的付款金额,计算使用硬币个数最少的交易方案。输入数据的每一行有6个整数和一个有2位小数的实数,分别表示可以使用的各种面值的硬币个数和付款金额。输出为交易所需要的最少硬币个数,如果不可能完成交易,则输出“impossible”。-Coins give change problem
Has six different denominations of coins in denominations of coins were 5 minutes, 10 cents, 20 cents, 50 cents, 1 yuan and 2 yuan. Now we use these coin denominations to shop and find the money. When shopping the number of coins of various denominations that can be used is stored in an array of Coins [1: 6], it is assumed for each denomination of coin store more than enough. For a given payment amount, calculated using the minimum number of coins trading scheme. Enter the data for each row has six integer and a real number two decimal places, respectively, the number of coins of various denominations that can be used and payment amount. The output is the minimum number of coins needed exchanges, if it is impossible to complete the transaction, the output impossible .
设有6种不同面值的硬币,各硬币的面值分别为5分、1角、2角、5角、1元和2元。现在要用这些面值的硬币来购物和找钱。购物时可以使用的各种面值的硬币个数存于数组Coins[1:6]中,假设商店里各面值的硬币有足够多。对于给定的付款金额,计算使用硬币个数最少的交易方案。输入数据的每一行有6个整数和一个有2位小数的实数,分别表示可以使用的各种面值的硬币个数和付款金额。输出为交易所需要的最少硬币个数,如果不可能完成交易,则输出“impossible”。-Coins give change problem
Has six different denominations of coins in denominations of coins were 5 minutes, 10 cents, 20 cents, 50 cents, 1 yuan and 2 yuan. Now we use these coin denominations to shop and find the money. When shopping the number of coins of various denominations that can be used is stored in an array of Coins [1: 6], it is assumed for each denomination of coin store more than enough. For a given payment amount, calculated using the minimum number of coins trading scheme. Enter the data for each row has six integer and a real number two decimal places, respectively, the number of coins of various denominations that can be used and payment amount. The output is the minimum number of coins needed exchanges, if it is impossible to complete the transaction, the output impossible .
(系统自动生成,下载前可以参看下载内容)
下载文件列表
coin
....\coin.cpp
....\coin.dsp
....\coin.dsw
....\coin.ncb
....\coin.opt
....\coin.plg
....\Debug
....\.....\coin.exe
....\.....\coin.ilk
....\.....\coin.obj
....\.....\coin.pch
....\.....\coin.pdb
....\.....\vc60.idb
....\.....\vc60.pdb