You are viewing a single comment's thread. Return to all comments →
C:Solution
void plusMinus(int arr_count, int* arr) { double positiveCount=0,NegativeCount=0,ZeroCount=0; for(int i=0;i0) { positiveCount+=1; } } printf("%.6f\n%.6f\n%.6f",positiveCount/arr_count,NegativeCount/arr_count,ZeroCount/arr_count); }
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 →
C:Solution
void plusMinus(int arr_count, int* arr) { double positiveCount=0,NegativeCount=0,ZeroCount=0; for(int i=0;i0) { positiveCount+=1; } } printf("%.6f\n%.6f\n%.6f",positiveCount/arr_count,NegativeCount/arr_count,ZeroCount/arr_count); }