Răspuns:
#include <iostream>
using namespace std;
int main(){
float V[100], n, i, aux, x, y, z, medAritmPoz, medArm, medAritmNen;
x = y = z = medAritmPoz = medArm = medAritmNen = 0;
cin >> n;
for(i = 1; i <= n; i++)
cin >> V[i];
for(i = 1; i <= n; i++)
if(V[i] > 0){
x++;
medAritmPoz = medAritmPoz + V[i];
}
else if(V[i] != 0){
z++;
medAritmNen = medAritmNen + V[i];
}
else{
y++;
aux = 1.0/V[i];
medArm = medArm + aux;
}
cout << "Media aritm a nr poz " << medAritmPoz / x << endl;
cout << "Media armonica " << medArm / y << endl;
cout << 'Media aritm a nr nenule " << medAritmNen / z;
return 0;
}