#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("bac.txt");
int F[101],n,gasit;
int main()
{
while(fin>>n)
F[n]=1;
for(int i=0;i<=100;i++)
if(F[i]==0)
{
int j=i;
while(F[j]==0 && j<=100)
j++;
if(i-1!=0 && j!=101)
{
cout<<i-1<<" "<<j<<endl;
gasit=1;
}
i=j;
}
if(!gasit) cout<<"nu exista";
return 0;
}
|