Advertisement
machkovskitomche

funkcii/delenje so zbir od cifrite(problem mal)

Aug 11th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int delivost(int n)
  4. {
  5.     int zbir=0;
  6.     zbir=((n%100)+(n/100));
  7.     return zbir;
  8. }
  9. int main()
  10. {
  11.     int n,i;
  12.     for(i=1000;i<10000;i++)
  13.     {
  14.         if((i%delivost(i))==0)
  15.         {
  16.            printf("Brojot %d go zadovoluva uslovot\n",i);
  17.             n++;
  18.         }
  19.     }
  20.     printf("Pronajdeni se %d takvi broevi",n);
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement