Let's demonstrates the use of if-else with c program:
/*demonstrates of if-else statement*/
printf("n is greater!!");
printf("n is less than!!");
n is less than!!
On execution of this program, when compiler check condition 10>=15, the condition is false so its execute else part statement i.e. n is less than!!.
Now try to write below program for more familiar with if-else:
Ans: To see solved program click here