17 candies shared by 5 kids, everyone the same, the rest kept aside. A function can return only one value, so share hands back both through pointers: each kid's share into *each, the leftovers into *left.
Each: 3, left: 2
#include <stdio.h>
void share(int candies, int kids, int *each, int *left) {
// your code here: *each is candies divided by kids, *left is the remainder
}
int main(void) {
int each = 0, left = 0;
share(17, 5, &each, &left);
printf("Each: %d, left: %d\n", each, left);
return 0;
}
Run tries the examples. When they look right, Submit.