Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- int N;
- scanf("%d", &N);
- int desetki = N / 10;
- N = N - (desetki * 10);
- int petki = N / 5;
- N = N - (petki * 5);
- int dvojki = N / 2;
- N = N - (dvojki * 2);
- int edinici = N / 1;
- N = N - (edinici * 1);
- printf("%d moneti od 10 denari\n", desetki);
- printf("%d moneti od 5 denari\n", petki);
- printf("%d moneti od 2 denari\n", dvojki);
- printf("%d moneti od 1 denar\n", edinici);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement