Bob103

списки

Jun 3rd, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <list>
  4.  
  5. using namespace std;
  6.  
  7. ifstream in("Input.txt");
  8. ofstream out("Output.txt");
  9.  
  10. int main()
  11. {
  12. int x,i;
  13. cin >> x;
  14.  
  15. list <int> get_numb;
  16.  
  17. int size = get_numb.size();
  18.  
  19. while (in >> i)
  20. {
  21. get_numb.push_front(i);
  22. }
  23.  
  24. while (!get_numb.empty())
  25. {
  26. if (x != get_numb.front())
  27. out << get_numb.front() << " ";
  28. get_numb.pop_front();
  29. }
  30. in.close();
  31. out.close();
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment