fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int a,b,x,c;
  6. bool z ;
  7. cin>>a>>b;
  8. for(a;a<=b;a++)
  9. {c=a;
  10. while (c>0)
  11. {
  12. z=true;
  13.  
  14. x=a%10;
  15. if ((x!=4)&&(x!=7))
  16. {
  17. z=false;
  18. break;
  19. }
  20. c=c/10;
  21.  
  22. }
  23. if (z==true)
  24. {
  25. cout <<a<<" ";
  26. }
  27. }
  28. return 0;
  29. }
Success #stdin #stdout 0.01s 5404KB
stdin
Standard input is empty
stdout
Standard output is empty