basics · beginner · ~15 min
Mirror the max logic for the minimum.
Implement int min2(int a, int b) returning the smaller value.
int min2(int a, int b) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.