#include<iostream.h>
#include<conio.h>
int &max(int &a,int &b)
{
if(a>b)
return a;
else
{
return b;
}
}
void main()
{ clrscr();
int a,b;
cout<<"enter 2 nos";
cout<<"\n\n";
cin>>a;
cout<<"\n\n";
cin>>b;
max(a,b)=1;
if(a==1)
{
cout<<"\n\n";
cout<<"a is greater";
}
if(b==1)
{
cout<<"\n\n";
cout<<"b is greater";
}
getch();
}
#include<conio.h>
int &max(int &a,int &b)
{
if(a>b)
return a;
else
{
return b;
}
}
void main()
{ clrscr();
int a,b;
cout<<"enter 2 nos";
cout<<"\n\n";
cin>>a;
cout<<"\n\n";
cin>>b;
max(a,b)=1;
if(a==1)
{
cout<<"\n\n";
cout<<"a is greater";
}
if(b==1)
{
cout<<"\n\n";
cout<<"b is greater";
}
getch();
}