Greatest of three numbers in C

Program to find the greatest of three numbers

Source code :

#include<stdio.h>

int main(){

int a = 20 , b = 40 , c = 10;


if (a >= b)
    {
        if(a >=c)
            printf("%d is the biggest number", a);
        else
            printf("%d is the biggest number", c);
    }
    else
    {
        if(b>=c)
            printf("%d is the biggest number", b);
        else
            printf("%d is the biggest number",c);
    }

return 0;

}

Output :

40 is the biggest number

Output :


                

Comments :