Skip to content

Commit 0797d6e

Browse files
authoredOct 1, 2020
Multiple if statements
We can use multiple if statements to check more than one conditions
1 parent c5c05c2 commit 0797d6e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
 

‎Multiple if statements

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include <stdio.h>
2+
int main()
3+
{
4+
int x, y;
5+
printf("enter the value of x:");
6+
scanf("%d", &x);
7+
printf("enter the value of y:");
8+
scanf("%d", &y);
9+
if (x>y)
10+
{
11+
printf("x is greater than y\n");
12+
}
13+
if (x<y)
14+
{
15+
printf("x is less than y\n");
16+
}
17+
if (x==y)
18+
{
19+
printf("x is equal to y\n");
20+
}
21+
printf("End of Program");
22+
return 0;
23+
}

0 commit comments

Comments
 (0)
Please sign in to comment.