Uint compare (uint Xia, uint shang, uint wen)//Xia is the lower limit temperature, shang is the upper limit temperature, and wen is the real-time temperature.
{
int t;
If (Wen< Xia || Wen> Shang)
t = 1;
Otherwise t = 0;;
Return (t);
}
//Out of range, the return value is 1, otherwise it is 0.