Greatest of three numbers in C++

Program to find the greatest of three numbers

Source code :

#include<iostream>

using namespace std;

int main(){

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


if (a >= b)
    {
        if(a >=c)
           cout<< a <<" is the biggest number";
        else
           cout<< c <<" is the biggest number";
    }
    else
    {
        if(b>=c)
            cout<< b <<" is the biggest number";
        else
            cout<< c <<" is the biggest number";
    }

return 0;

}

Output :

40 is the biggest number

Output :


                

Comments :