#include "stdio.h"
void main()
{
int x;
printf("enter x:");
scanf("%d",&x);
fun(x);
}
int fun(int x)
{
int i;
if(x>=100)
{
printf("%d",100);
return fun(x-100);
}
if(x>=50)
{
printf("50");
return fun(x-50);
}
if(x>=20)
{
printf("20");
return fun(x-20);
}
if(x>=10)
{
printf("%d",10);
return fun(x-10);
}
if(x>=5)
{
printf("5");
return fun(x-5);
}
if(x<5)
{
for(i=0;i<x;i++)
{
printf("%d",1);
}
}
}
人民币的拆分
最新推荐文章于 2025-06-16 11:31:48 发布