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