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