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