+ 1
Is this function functional? Tips would be appreciated
// returns index of the biggest member int max(int *a, int n){ int max = a[0], i, id; for(i = 0; i < n; i ++) if(max < a[i]) { max = a[i]; id = i; } return id; }
1 ответ
+ 1
Appreciate it 👍
// returns index of the biggest member int max(int *a, int n){ int max = a[0], i, id; for(i = 0; i < n; i ++) if(max < a[i]) { max = a[i]; id = i; } return id; }