Four cats' bowls each have some grams of food left. Make the pointer least point at the bowl with the least, then add 50 g to that bowl through it. Every bowl gets printed at the end.
40 65 30 25
#include <stdio.h>
int main(void) {
int bowls[] = {40, 15, 30, 25};
int *least = &bowls[0];
for (int i = 1; i < 4; i++) {
// your code here: if this bowl has less, point least at it
}
// your code here: add 50 through least
for (int i = 0; i < 4; i++) {
printf("%d\n", bowls[i]);
}
return 0;
}
Run tries the examples. When they look right, Submit.