Guest User

Untitled

a guest
Oct 18th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string.h>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.  
  10. ifstream read_file;
  11. read_file.open("D:\\text.txt");
  12. char output[100];
  13.  
  14. while (!read_file.eof())
  15. {
  16. read_file >> output;
  17. if(strlen(output)==2 && output[0]>='0' && output[0]<='9' && output[1]>='0' && output[1]<='9')
  18. cout<<output<<"\n";
  19. }
  20.  
  21. read_file.close();
  22. return 0;
  23. }
Add Comment
Please, Sign In to add comment