Răspuns :
Răspuns:
#include <iostream>
using namespace std;
int main()
{
int n,i,c[101],a,b;
cin>>n>>a>>b>>k;
for(i=1;i<=n;i++) cin>>c[i];
int suma_pare=0,q=0,nr=0,p=0;
int max=c[1],min=c[1];
for(i=1;i<=n;i++){
if(c[i]%2==0 && i%2==1) suma_pare+=c[i];
if(c[i]>max) max=c[i];
if(min>c[i]) min=c[i];
if(a<c[i] && c[i]<b) q++;
if(i==k) cout<<i<<" ";
int copie=c[i];
int copie1=c[i];
while(copie>=9){
copie/=10;
}
if(2<copie && copie<8) nr++;
while(copie1){
p++;
copie1/=10;
}
if(p==4) cout<<c[i]<< " ";
}
cout<<suma_pare<<" "<<max" "<<min<<" "<<q<<" "<<nr;
}
Explicație: