Skip to content

Commit a97ac35

Browse files
authored
greaterno
Program to find the greatest of two numbers in c
1 parent c5c05c2 commit a97ac35

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

greaterno

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* C Program to Find Largest of Two numbers */
2+
3+
#include <stdio.h>
4+
5+
int main() {
6+
int a, b;
7+
printf("Please Enter Two different values\n");
8+
scanf("%d %d", &a, &b);
9+
10+
if(a > b)
11+
{
12+
printf("%d is Largest\n", a);
13+
}
14+
else if (b > a)
15+
{
16+
printf("%d is Largest\n", b);
17+
}
18+
else
19+
{
20+
printf("Both are Equal\n");
21+
}
22+
23+
return 0;
24+
}

0 commit comments

Comments
 (0)