sivan_iut

Untitled

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