|
|
void num_coins (const int& price, int coins[], const int values[], const int n)
| num_coins |
#include <bsp_23.cpp>
Calculates the number of coins for each value such that the price is represented.
Parameters:
price | given price to be represented |
coins | resulting number of different coins |
values | decending currency values of the different coins |
n | given number of different coins |
void print_coins (const int coins[], const int values[], const int n)
| print_coins |
#include <bsp_23.cpp>
Prints the number of coins for each value such that the price is represented.
Parameters:
coins | number of different coins |
values | decending currency values of the different coins |
n | number of different coins |
float weight_coins (const int coins[], const float weights[], const int n)
| weight_coins |
#include <bsp_23.cpp>
Prints the number of coins for each value such that the price is represented.
Parameters:
coins | number of different coins |
weights | weights of the different coins |
n | number of different coins |
Returns: accumulated weight of the coins in the purse
int main (const int argc, const char* argv[])
| main |
#include <bsp_23.cpp>
void num_coins (const int& price, int coins[], const int values[], const int n)
| num_coins |
#include <bsp_23.cpp>
void print_coins (const int coins[], const int values[], const int n)
| print_coins |
#include <bsp_23.cpp>
float weight_coins (const int coins[], const float weights[], const int n)
| weight_coins |
#include <bsp_23.cpp>
Generated by: ghaase on mephisto on Thu May 24 08:42:58 2007, using kdoc 2.0a54. |