Globals


Annotated List
Files
Globals
Hierarchy
Index

bsp_23.cpp

Global member Documentation

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:
pricegiven price to be represented
coinsresulting number of different coins
valuesdecending currency values of the different coins
ngiven 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:
coinsnumber of different coins
valuesdecending currency values of the different coins
nnumber 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:
coinsnumber of different coins
weightsweights of the different coins
nnumber 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.