Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- ifstream in("datein.txt");
- ofstream out("dateout.txt");
- int n;
- while (in >> n)
- {
- int p = n;
- int ok = 0;
- while (p)
- {
- if (p % 10 == 7)
- ok = 1;
- p /= 10;
- }
- if (ok==1)
- out << n << " ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement