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