Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<fstream>
- using namespace std;
- ifstream fin("numere.txt.cpp");
- void citire(int n)
- {
- int x;
- if(n==0) return ;
- fin>>x;
- if(x%2==0) cout<<x<<" ";
- citire(n-1);
- if(x%2!=0) cout<<x<<" ";
- }
- int main()
- {
- int n;
- fin>>n;
- citire(n);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement