#include <iostream>
using namespace std;
int main()
{
int a,b,c,cho;
    cout<<"\n Largest among three numbers...";
    cout<<"\n ------------------------------";
    cout<<"\n\n Enter the Three numbers : ";
    cin>>a>>b>>c;
    cout<<"\n\nChoose the Format";
    cout<<"\n 1.Using if Statement.";
    cout<<"\n 2.Using if-else Statement.";
    cout<<"\n\n Enter your Choice : ";
    cin>>cho;
    switch(cho)
    {
        case 1:
            {if(a>=b&&a>=c)
                cout<<"\n\n The Largest Number is "<<a<<".";
            if(b>=a&&b>=c)
                cout<<"\n\n The Largest Number is "<<b<<".";
            if(c>=a&&c>=b)
                cout<<"\n\n The Largest Number is "<<c<<".";
            break;}
        case 2: 
            {if(a>=b&&a>=c)
                cout<<"\n\n The Largest Number is "<<a<<".";
            else if(b>=c)
                cout<<"\n\n The Largest Number is "<<b<<".";
            else
                cout<<"\n\n The Largest Number is "<<c<<".";
            break;}
        default:
            {cout<<"\n\n Invalid Option...";
            cout<<"\n Please Select Valid One...";}
    }
    cout<<"\n\n |Program End|";
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: