Răspuns:
Raspuns
Explicație:
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;
ifstream fin("sort2.in");
ofstream fout("sort2.out");
int main()
{
int n; /// nr
int v[100],i=1;
int cnt=0;
for(;fin>>n;)
{
if(n<=9999)
if(n<=99){
v[i]=n;
i++;
cnt++;
}
}
if(cnt==0)
fout<<"NU EXISTA";
else sort(v+1,v+cnt+1);
for(i=1;i<=cnt;i++)
fout<<v[i]<<' ';
}