Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int n,r,temp,ct=0;
- scanf("%d",&n);
- temp=n;
- while(n!=0)
- {
- r=n%10;
- n=n/10;
- if(r!=7&&r!=4)
- ct++;
- }
- if(ct==0||temp%4==0||temp%7==0)
- printf("YES\n");
- else
- printf("NO\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment