文件名称:coin
-
所属分类:
- 标签属性:
- 上传时间:2015-05-12
-
文件大小:693.79kb
-
已下载: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/coin.cpp
coin/coin.dsp
coin/coin.dsw
coin/coin.ncb
coin/coin.opt
coin/coin.plg
coin/Debug/
coin/Debug/coin.exe
coin/Debug/coin.ilk
coin/Debug/coin.obj
coin/Debug/coin.pch
coin/Debug/coin.pdb
coin/Debug/vc60.idb
coin/Debug/vc60.pdb
coin/coin.cpp
coin/coin.dsp
coin/coin.dsw
coin/coin.ncb
coin/coin.opt
coin/coin.plg
coin/Debug/
coin/Debug/coin.exe
coin/Debug/coin.ilk
coin/Debug/coin.obj
coin/Debug/coin.pch
coin/Debug/coin.pdb
coin/Debug/vc60.idb
coin/Debug/vc60.pdb
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.