You are viewing a single comment's thread. Return to all comments →
int main() { int n; double neg=0,pos=0,zero=0; scanf("%d",&n); int arr[n]; for(int i=0;i
} else if(arr[i]==0){ zero++; } else{ pos++; } } printf("%f\n",pos/n); printf("%f\n", neg/n); printf("%f\n",zero/n); return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Plus Minus
You are viewing a single comment's thread. Return to all comments →
include
int main() { int n; double neg=0,pos=0,zero=0; scanf("%d",&n); int arr[n]; for(int i=0;i
}