遞歸練習之換零錢方式統計(c/c++)
/*********************************************************************************
Copyright (C), 1988-1999, drvivermonkey. Co., Ltd.
File name:
Author: Driver Monkey
Version:
Mail:[email protected] qq:196568501
Date: 2014.04.02
Description: 遞歸練習之換零錢方式統計(c/c++)
*********************************************************************************/
#include
#include
#include
#include
#include
#include
#include
#include
#include /* labs */
#include
using namespace std;
typedef struct
{
int value;
int flag;
}valut_t;
typedef struct
{
valut_t value_50;
valut_t value_25;
valut_t value_10;
valut_t value_5;
valut_t value_1;
}all_value_t;
static int fuction(int total_money, all_value_t value);
static int is_only_50_change(all_value_t& value);
static int is_only_25_change(all_value_t& value);
static int is_only_10_change(all_value_t& value);
static int is_only_5_change(all_value_t& value);
static int is_only_1_change(all_value_t& value);
int main()
{
all_value_t value = {{50,1},{25,1},{10,1},{5,1},{1,1}};
cout<<"fuction = " <