Download easy notes of C++ c++ programs
#include<iostream.h>
#include<conio.h>
class largest
{
public:
int a ,b,c;
void input()
{
cout<<"enter three marks";
cin>>a>>b>>c;
};
void show()
{
if(a>b)
{
if(a>c)
cout<<"a is greater:"<<a;
else
cout<<"c is greter:"<<c;
}
else
{
if(b>c)
cout<<"b is greter:"<<b;
else
cout<<"c is greater:"<<c;
}
}
};
void main()
{
clrscr();
largest obj;
obj.input();
obj.show();
getch();
}
0 Comments