Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Analyze_array(int* arr, int arr_size, int *x1, int *x2, double
- *x3)
- {
- int min = arr[0];
- int max = arr[0];
- int sum = 0;
- int counter;
- for (counter = 0; counter < arr_size; counter++)
- {
- if (arr[counter] < min) min = arr[counter];
- if (arr[counter] > max) max = arr[counter];
- sum += arr[counter];
- }
- *x1 = min;
- *x2 = max;
- *x3 = (double)sum / arr_size;
- }
Advertisement
Add Comment
Please, Sign In to add comment