1원 단위까지 잔돈 거슬러주기 코드다.
#include <stdio.h>
int main(void)
{
int money=0;
scanf("%d", &money);
printf("money?>%d\n",money);
printf("10000:%d\n", money/10000);
money=money%10000;
printf("5000:%d\n", money/5000);
money=money%5000;
printf("1000:%d\n", money/1000);
money=money%1000;
printf("500:%d\n", money/500);
money=money%500;
printf("100:%d\n", money/100);
money=money%100;
printf("50:%d\n", money/50);
money=money%50;
printf("10:%d\n", money/10);
money=money%10;
printf("5:%d\n", money/5);
money=money%5;
printf("1:%d\n", money/1);
money=money%1;
return 0;
}