Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int n,a,b;
- scanf("%d",&n);
- printf("%d\n",n);
- a=n/100;
- printf("%d nota(s) de R$ 100,00\n",a);
- b=n%100;
- a=b/50;
- printf("%d nota(s) de R$ 50,00\n",a);
- b=b%50;
- a=b/20;
- printf("%d nota(s) de R$ 20,00\n",a);
- b=b%20;
- a=b/10;
- printf("%d nota(s) de R$ 10,00\n",a);
- b=b%10;
- a=b/5;
- printf("%d nota(s) de R$ 5,00\n",a);
- b=b%5;
- a=b/2;
- printf("%d nota(s) de R$ 2,00\n",a);
- b=b%2;
- a=b/1;
- printf("%d nota(s) de R$ 1,00\n",a);
- b=b%1;
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement