C program check 15 is greater than 18 or not using if else
C Programming Language Decision Making of C Language (Article) Decision Making of C Language (Program)
1142Program:
#include"stdio.h" void main( ) { int x,y; x=15; y=18; if (x > y ) { printf("x is greater than y \n"); } else { printf("y is greater than x \n"); } }
Output:
y is greater than x Press any key to continue . . .
Explanation:
In this c program you have learned how to use if else in real life. You checked that 15 is greater than 18 or not.
This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.