Advertisement
SelinD

v69s3e4

Feb 19th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include<iostream>
  2. #include<fstream>
  3. using namespace std;
  4. ifstream fin("numere.txt.cpp");
  5. void citire(int n)
  6. {
  7. int x;
  8. if(n==0) return ;
  9. fin>>x;
  10. if(x%2==0) cout<<x<<" ";
  11. citire(n-1);
  12. if(x%2!=0) cout<<x<<" ";
  13. }
  14.  
  15. int main()
  16. {
  17. int n;
  18. fin>>n;
  19. citire(n);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement