sivan_iut

Untitled

Feb 23rd, 2020
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int N;
  5.     scanf("%d",&N);
  6.     int remainder;
  7.     int a;
  8.     int COUNT=0;
  9.     while(N!=0)
  10.     {
  11.         N=N/10;
  12.         ++COUNT;
  13.     }
  14.     while(remainder!=4 || remainder!=7)
  15.     {
  16.         remainder=N%10;
  17.         N=N/10;
  18.         a++;
  19.     }
  20.     if(a==COUNT)
  21.         printf("YES");
  22.     else if(a!=COUNT)
  23.     {
  24.         if(N%4==0 || N%7==0)
  25.             printf("YES");
  26.         else
  27.             printf("NO");
  28.     }
  29.  
  30.     return 0;
  31. }
Add Comment
Please, Sign In to add comment