#include <iostream>
#include <math.h>
using namespace std;
class summation
{
int a,b,sum,mul;
public:
void getdata();
void calculation();
void putdata();
};
void summation ::getdata()
{
cout<<"enter two numbers: ";
cin>>a>>b;
}
void summation ::calculation()
{
sum=a+b;
mul=a*b;
}
void summation ::putdata()
{
cout<<sum<<" "<<mul;
}
int main()
{
summation s;
s.getdata();
s.calculation();
s.putdata();
}
#include <math.h>
using namespace std;
class summation
{
int a,b,sum,mul;
public:
void getdata();
void calculation();
void putdata();
};
void summation ::getdata()
{
cout<<"enter two numbers: ";
cin>>a>>b;
}
void summation ::calculation()
{
sum=a+b;
mul=a*b;
}
void summation ::putdata()
{
cout<<sum<<" "<<mul;
}
int main()
{
summation s;
s.getdata();
s.calculation();
s.putdata();
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন