/* a program to find location and value of smallest value in a 10 element array */ int x[10]; int minloc (int a[], int low, int high ) { int i; int x; int k; k = low; x = a[low]; i = low + 1; while ( i < high ) { output(i); if ( a[i] < x ) { x = a[i]; k = i; } i = i + 1; } output(k); return k; } void main(void){ int i; i = 0; while ( i < 3 ) { x [i] = input(); i = i + 1; } output (x[(minloc ( x , 0, 10 ))]); }