#include <iostream>
using namespace std;
int main()
{
int n,v[100],i,gasit=0,x,nr,y,p[100];
cout<<"Dati n : ";cin>>n;nr=0;
cout<<"Dati nr pe care trebuie sa-l cautam: ";cin>>x;
for (i=1;i<=n;i++)
{
cout<<"v["<<i<<"]=";cin>>v[i];
}
y=1;
for(i=1;i<=n;i++)
if (v[i]==x)
{gasit=1;
nr++;
p[y]=i;
y++;
}
if (gasit==1)
{cout<<x<<" se afla in vector si apare de "<<nr<<" ori pe pozitia/ile ";
for(y=1;y<=nr;y++)
cout<<p[y]<<" ";
}
else cout<<x<<" nu se afla in vector";
}