#include
void main()
{
int m;
int FaceValue = {100, 50, 20, 10, 5, 2, 1};
int MoneyCount;
int i, tmp;
printf("输入Money值:");
scanf("%d", &m);
tmp = m;
for(i=0; i<7; i++)
{
MoneyCount[i] = tmp/FaceValue[i];
tmp = tmp%FaceValue[i];
}
printf("%d元: ", m);
for(i=0; i<7; i++)
{
printf("%d张%d元 ", MoneyCount[i], FaceValue[i]);
}
printf("");
}
标签:钱数,求取,纸币
版权声明:文章由 百问十五 整理收集,来源于互联网或者用户投稿,如有侵权,请联系我们,我们会立即处理。如转载请保留本文链接:https://www.baiwen15.com/article/147345.html