Advertisement
Malinovsky239

Untitled

Oct 13th, 2011
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include <cstdio>
  2. int main() {
  3.     int k = 0;
  4.     char a;
  5.  
  6.     while (scanf("%c", &a) != -1) {
  7.         if ((a == '4') || (a == '7'))
  8.             k++;
  9.     }
  10.  
  11.     if ((k == 4) || (k == 7))
  12.         printf("YES");
  13.     else
  14.         printf("NO");
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement