programming example write program to find whether number is even or odd #include int main(int aprintf("\ enter the value of ")scanf("% "& )if( % == printf("\ % is even" )else printf("\ % is odd" )return output enter the value of is even if-else-if statement language supports if-else-if statements to test additional conditions apart from the initial test expression the if-else-if construct works in the same way as normal if statement its construct is given in fig syntax of if-else-if statement if (test expression statement block else if (test expression statement block else statement block xstatement ytrue test expression statement block true false test expression statement block false statement block statement figure if-else-if statement construct note that it is not necessary that every if statement should have an else block as supports simple if statements after the first test expression or the first if branchthe programmer can have as many else-if branches as he wants depending on the expressions that have to be tested for examplethe following code tests whether number entered by the user is negativepositiveor equal to zero #include int main(