by Dinesh Thakur

Let us use variables a, b and c (all of type int) to represent three integer numbers and variable max (also of type int) to represent the maximum of them.

It first accepts the values of variables a, b and c. To determine the maximum number, the larger number of a and b is first assigned to max using the if-else statement. Then the larger of variables max and c, which is the maximum of the three given numbers, is determined using a simple if statement. Finally, the value of max is printed. The program is given below.  

void main()
       int a,b,c;
       printf("Enter the Value of a = ");
       printf("Enter the Value of b = ");
       printf("Enter the Value of c = ");
       if (a>b&&a>c)
                 printf("a is Greater ");
      else if(b>a&&b>c)
                   printf("b is Greater");
                   printf("c is Greater");

C Program to Find the Greatest Between 3 Number