sivan_iut

Untitled

Feb 16th, 2020
44
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.     scanf("%d",&n);
  6.     int count=0;
  7.     while(n!=0)
  8.     {
  9.         n=n/10;
  10.         ++count;
  11.     }
  12.  
  13.     int i;
  14.     for(i=0;i<count;i++)
  15.     {
  16.         int x;
  17.         n=n/10;
  18.         if(n==4 || n==7)
  19.         printf("YES");
  20.         else
  21.             break;
  22.         printf("NO");
  23.  
  24. }
  25.    
  26.  
  27.     return 0;
  28. }
Add Comment
Please, Sign In to add comment