Advertisement
Josif_tepe

Untitled

Nov 11th, 2022
870
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main() {
  5.     int kusur;
  6.     scanf("%d", &kusur);
  7.    
  8.     int desetki = kusur / 10;
  9.    
  10.     kusur = kusur - (desetki * 10);
  11.    
  12.     int petki = kusur / 5;
  13.    
  14.     kusur = kusur - (petki * 5);
  15.    
  16.     int dvojki = kusur / 2;
  17.    
  18.     kusur = kusur - (dvojki * 2);
  19.    
  20.     int edinici = kusur;
  21.      
  22.    
  23.     printf("%d moneti od 10 denari\n", desetki);
  24.     printf("%d moneti od 5 denari\n", petki);
  25.     printf("%d moneti od 2 denari\n", dvojki);
  26.     printf("%d moneti od 1 denar\n", edinici);
  27.    
  28.    
  29.     return 0;
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement