Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- using namespace std;
- int main()
- {
- int n,x;
- bool ok=true;
- ifstream f("numere25.in");
- f>>n;
- f>>x;
- ofstream g("numere25.out");
- for(int i=1;i<=n;++i)
- {
- if(i>x)
- while(f>>x&&i>x);
- if(i!=x)
- g<<i<<' ',ok=false;
- }
- f.close();
- if(ok)
- g<<"Nu exista";
- g.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment