Advertisement
jordanov

Zad 1

Oct 21st, 2015
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. ?? ?????????? ???? ?? ?????? ??? ?????? n ? ?, ?? ????????? n ????? ?? ???? ?? ???? ??? ????.?? ?? ???????? ????? ?? ??????????? ?????? ?? ?????? ?? k.
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6. int main()
  7. {
  8.  
  9. int n,k,x,i;
  10. printf("Vnesete dva celi broevi n i k\n");
  11. scanf("%d%d", &n, &k);
  12.  
  13. int br=0;
  14. for(i=1;i<=n;i++)
  15. {
  16. printf("Vnesete go n redniot broj \n");
  17.  
  18. scanf("%d", &x);
  19. if(x%k==0)
  20. {
  21. br++;
  22. }
  23.  
  24. }
  25. printf("delivi so k se: %d", br);
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement