Skip to content

Commit 8136c59

Browse files
authored
GreatNo.
This will find highest of two no. e.g A or B
1 parent 6be80a8 commit 8136c59

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

greaternumberofAorB

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// C program to find the greatest of three numbers
2+
3+
#include<stdio.h>
4+
int main()
5+
{
6+
//Fill the code
7+
int num1, num2, num3;
8+
scanf(“%d %d %d”,&num1,&num2,&num3);
9+
if(num1 > num2 && num1 > num3)
10+
{
11+
printf(“%d is greater”,num1);
12+
}
13+
else if(num2 > num1 && num2 > num3)
14+
{
15+
printf(“%d is greater”,num2);
16+
}
17+
else
18+
{
19+
printf(“%d is greater”,num3);
20+
}
21+
return 0;
22+
}

0 commit comments

Comments
 (0)