100 元人民币有几多种换零方式

100 元人民币有多少种换零方式?
零钱限制为(1,2,5,10,20,50 元)。
问题同标题。
------解决思路----------------------

#include<stdio.h>
#include<string.h>
#include<stdlib.h>

int main()
{
int i, j, k, m, n, r;
int count = 0;

for(r = 0; r <= 2; r++)
{
for(n = 0; n <= 5; n++)
{
for(m = 0; m <= 10; m++)
{
for(k = 0; k <= 20; k++)
{
for(j = 0; j <= 50; j++)
{
for(i = 0; i <= 100; i++)
{
if(100 == i * 1 + j * 2 + k * 5 + m * 10 + n * 20 + r * 50)
{
count++;
}
}
}
}
}
}
}

printf("count = %d\n", count);
system("pause");
return 0;
}

------解决思路----------------------
找零递归http://blog.****.net/wumuzi520/article/details/7837143
记得结贴(快升双星了)  谢
------解决思路----------------------
引用:
找零递归http://blog.****.net/wumuzi520/article/details/7837143
记得结贴(快升双星了)  谢

++
------解决思路----------------------
仅供参考:
//问题是这样,有N个数字,数值不同,要列出用他们不同的组合相加等于1000的情况。
//比如,a[3]={200,300,400}
//则有的情况为:
//5 0 0
//3 0 1
//2 2 0
//1 0 2
//0 2 1
//等情况。
#include <stdio.h>
int a[3]={200,300,400};
int temp[3]={0,0,0};
void function(int sum, int index) {
    int j,i;

    if (sum==1000) {
        for (j=0;j<3;j++) printf("%d ",temp[j]);
        printf("\n");
        return;
    } else if (sum>1000) return;
    else for (i=index;i<3;i++) {
        temp[i]++;
        function(sum+a[i],i);
        temp[i]--;
    }
}
void main() {
    function(0,0);
}
//5 0 0
//3 0 1
//2 2 0
//1 0 2
//0 2 1
//