Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- main()
- {
- int i,z,k,j,d,s;
- scanf("%d",&k);
- for (i=100;i<1000;i=i+1)
- {
- j=i%10;
- d=(i/10)%10;
- s=i/100;
- z=j+d+s;
- if (i%k==0 && z==17)
- printf("Ovaj broj se uklapa: %d \n",i);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement