Created
November 28, 2018 11:30
-
-
Save dbc2201/a45235ae3afb62a20eed4ec477bc16af to your computer and use it in GitHub Desktop.
working of if-else-if ladder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int a, b = 5, c = 12; | |
printf("Enter an integer value:\n"); | |
scanf("%d", &a); | |
if ( a > 10 ) | |
{ | |
printf("%d is greater than 10.\n", a); | |
} | |
else if ( a == 10 ) | |
{ | |
printf("%d is equal 10.\n", a); | |
} | |
else // if ( a < 10 ) | |
{ | |
printf("%d is smaller than 10.\n", a); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment