Show the max and min value

If you declared minTemp and maxTemp as global variables, then they got initialized to 0. So, no temp was lower than that, so the code correctly pointed that out.

Give minTemp and maxTemp unreasonable initial values.

int minTemp = 32000;
int maxTemp = -32000;