This is for you my friends to learn about C/C++ amd much more
#include<iostream.h>
#include<conio.h>
class Add
{
public:
int a,b;
void sum()
{
cout<<a+b;
}
void show()
{
cout<<"Enter the value For adding\n";
cin>>a>>b;
getch();
}
};
void main()
{
clrscr();
Add obj;
obj.show();
obj.sum();
getch();
}
#include<iostream.h>
#include<conio.h>
class Add
{
public:
int a,b;
void sum()
{
cout<<a+b;
}
void show()
{
cout<<"Enter the value For adding\n";
cin>>a>>b;
getch();
}
};
void main()
{
clrscr();
Add obj;
obj.show();
obj.sum();
getch();
}
Coding Format
Output Format
Thank You
I hope you like it