Explicație:
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("date.in");
ofstream fout("date.out");
int main()
{
int n,a,b,sir[100],ab[100],k,l;
fin>>n;
fin>>a;
fin>>b;
k=0;
l=0;
for(int i=0;i<n;i++)
fin>>sir[i];
for(int i=0;i<n;i++)
if(sir[i]>=a && sir[i]<=b)
{
ab[k]=sir[i];
k++;
}
else
l++;
for(int i=0;i<k;i++)
fout<<ab[i]<<" ";
fout<<endl<<l;
fin.close();
fout.close();
return 0;
}