mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-12-16 15:44:39 +00:00
12 lines
165 B
C
12 lines
165 B
C
|
int fun(int *a, int *b, int n) {
|
||
|
*b = 0;
|
||
|
|
||
|
for (int i = 1; i < n; i++) {
|
||
|
if (a[i] > a[*b]) {
|
||
|
*b = i;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return a[*b];
|
||
|
}
|