Advertisement
ithoran

Untitled

Mar 21st, 2015
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.22 KB | None | 0 0
  1. #include <stdio.h>
  2. main()
  3. {
  4.     int i,z,k,j,d,s;
  5.     scanf("%d",&k);
  6.     for (i=100;i<1000;i=i+1)
  7.     {
  8.         j=i%10;
  9.         d=(i/10)%10;
  10.         s=i/100;
  11.         z=j+d+s;
  12.         if (i%k==0 && z==17)
  13.             printf("Ovaj broj se uklapa: %d \n",i);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement