Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Banknoti i moneti
- #include <stdio.h>
- int main() {
- int num5000, num1000, num500, num100, num50, num10, num5, num2, num1, num;
- scanf("%d", &num);
- num5000=num/5000;
- num%=5000;
- printf("%d*5000\n", num5000);
- num1000=num/1000;
- num%=1000;
- printf("%d*1000\n", num1000);
- num500=num/500;
- num%=500;
- printf("%d*500\n", num500);
- num100=num/100;
- num%=100;
- printf("%d*100\n", num100);
- num50=num/50;
- num%=50;
- printf("%d*50\n", num50);
- num10=num/10;
- num%=10;
- printf("%d*10\n", num10);
- num5=num/5;
- num%=5;
- printf("%d*5\n", num5);
- num2=num/2;
- num%=2;
- printf("%d*2\n", num2);
- num1=num/1;
- printf("%d*1\n", num1);
- return 0;
- }
Add Comment
Please, Sign In to add comment