find the greatest value out of three numbers



#include <stdio.h>

#include<conio.h>

int main()
{ int a, b, c; printf("Enter a,b,c: "); scanf("%d %d %d", &a, &b, &c); if (a > b && a > c) { printf("a is Greater than b and c"); } else if (b > a && b > c) { printf("b is Greater than a and c"); } else if (c > a && c > b) { printf("c is Greater than a and b"); } else { printf("all are equal or any two values are equal"); } return 0; }


Output:-
Enter a,b,c: 2 3 4 c is Greater than a and b

Comments

Popular posts from this blog

Check whether the no entered is Palindrome or not

Calculate Factorial of a given no with help of Recursion

Find max. and min. element in the integer array