Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(){
- int d,pil=0,il=0,pst=0,st=0,pde=0,de=0,p=0,dv=0,den=0;
- scanf("%d",&d);
- pil += d / 5000;
- d = d % 5000;
- il += d / 1000;
- d = d % 1000;
- pst += d / 500;
- d = d % 500;
- st += d / 100;
- d = d % 100;
- pde += d / 50;
- d = d % 50;
- de += d / 10;
- d = d % 10;
- p += d / 5;
- d = d % 5;
- dv += d / 2;
- d = d % 2;
- den += d / 1;
- d = d % 1;
- printf("%d*5000\n%d*1000\n%d*500\n%d*100\n%d*50\n%d*10\n%d*5\n%d*2\n%d*1\n",pil,il,pst,st,pde,de,p,dv,den);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement