/*
* Copyright (c) 2014,烟台大学计算机学院
* All rights reserved.
*文件名称: test.cop
*作者:翟兴雷
*完成日期:2014年10月23日
*版本号:v1.0
*
*问题描述:
*输入描述:
*程序输出:
*/
#include <iostream>
using namespace std;
int main()
{
int i,j,k;
cout<<"一元人民币兑换1分,2分,5分硬币的方案有:"<<endl;
for(i=1; i<=100; i++)
for(j=1; j<=50; j++)
for(k=1; k<=20; k++)
if(i+j*2+k*5==100)
{
cout<<":"<<"1分的有"<<i<<","<<"2分的有"<<j<<","<<"5分的有"<<k<<endl;
}
return 0;
}