I implemented the following program in C
#include int main() { int a = 10 ; if(0 < a < 5) {
Since 0 is less than 10, 0 < a would always evaluates to 1 , which is less than 5, making 0 < a < 5 always true. Change your condition to
0
10
0 < a
1
5
0 < a < 5
true
if(0 < a && a < 5) {...}