Show the max and min value

PaulS:
You must have SOME idea. After all, it isn't rocket science to determine if this value is more than that value. If it is, that value isn't the max. This value is.

It isn't rocket science to determine if this value is less than that value. If it is, that value isn't the min. This one is.

Thanks for you reply i tried to did what you said the max value works fine but the min value keep showing 0 only the lm35 reading is between 20 and 30 here is what i did

int tempC ;
int maxtemp ;
int mintemp ;
if (tempC > maxtemp) maxtemp = tempC ;
if (tempC < mintemp) mintemp = tempC ;