sivan_iut

Untitled

Feb 16th, 2020
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 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.     while(count!=0)
  18.     {
  19.         count=count/10;
  20.         if(count!=4 || count!=7)
  21.             continue;
  22.         }
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.     return 0;
  38. }
Add Comment
Please, Sign In to add comment