#include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cout <<"Enter the four values :"<<endl ;
cin >>a>>b>>c>>d;
cout <<"a="<<a<<"\t b="<<b<<"\t c="<<c<<"\t d="<<d<<endl;
if (a>b&&a>c)
{
if (a>d)
{
cout <<"Greatest number is a";
}
else
cout <<"Greatest number is d";
}
else if (b>c&&b>d)
{
cout <<"Greatest number is b";
}
else if (c>d)
{
cout <<"Greatest number is c";
}
else
cout <<"Greatest number is d";
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: