brsjak

Banknoti i moneti - SPlab1-zadaca 5

Oct 11th, 2016
501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.74 KB | None | 0 0
  1. //Banknoti i moneti
  2.  
  3. #include <stdio.h>
  4.  
  5. int main() {
  6.     int num5000, num1000, num500, num100, num50, num10, num5, num2, num1, num;
  7.     scanf("%d", &num);
  8.     num5000=num/5000;
  9.     num%=5000;
  10.     printf("%d*5000\n", num5000);
  11.     num1000=num/1000;
  12.     num%=1000;
  13.     printf("%d*1000\n", num1000);
  14.     num500=num/500;
  15.     num%=500;
  16.     printf("%d*500\n", num500);
  17.     num100=num/100;
  18.     num%=100;
  19.     printf("%d*100\n", num100);
  20.     num50=num/50;
  21.     num%=50;
  22.     printf("%d*50\n", num50);
  23.     num10=num/10;
  24.     num%=10;
  25.     printf("%d*10\n", num10);
  26.     num5=num/5;
  27.     num%=5;
  28.     printf("%d*5\n", num5);
  29.     num2=num/2;
  30.     num%=2;
  31.     printf("%d*2\n", num2);
  32.     num1=num/1;
  33.     printf("%d*1\n", num1);
  34.     return 0;
  35. }
Add Comment
Please, Sign In to add comment