Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <fstream>
  2. using namespace std;
  3.  
  4. ifstream fin("numere8.in");
  5. ofstream fout("numere8.out");
  6.  
  7. int main()
  8. {
  9. int a, n;
  10.  
  11. bool exista[10001] = {false};
  12.  
  13. while (fin >> a)
  14. if (a < 10000)
  15. exista[a] = true;
  16.  
  17. for (int i = 9999; i >= 1; --i)
  18. if (!exista[i])
  19. fout << i << ' ';
  20.  
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement