Coding Challenge 1 (C)
Find the errors in this code
3 Replies
Upon initial analysis, the errors lie here
Undeclared 'i' ,
Undeclared 'delayCount' ,
Need to include stdbool.h to recognize 'bool' type,
The ending bracket int the last line ')' (maybe a typo)
Always prints the temp is 25.00 C and the status as OFF as the value of temperatureDiferrence would be 3 which is greater than the tolerance.
Nice, you got it
Variables 'i' and delayCount in the for loop inside the main function are used without being declared. You should declare them before using them in the loop.