#include <stdio.h>

double min_double(double min_array[], int antal_elem) {
  double minst = min_array[0];
  
  for (int i = 1; i < antal_elem; ++i) {
    if (min_array[i] < minst) {
      minst = min_array[i];
    } // else not necessary
  }

  return minst;
}

int main() {
  
  double min_array_med_doubles[8] = { 1.3, 67.90, 0.6, 8721.8765, 8.7, 92.1, 0.91, 906.09 };
  double minsta_doublen;

  minsta_doublen = min_double(min_array_med_doubles, 8);

  printf("Minsta värdet var %f\n", minsta_doublen);
  

}
