63 151
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #20905 in C++ for ritimukta mohapatra

Question #20905
write a c++ program to addition of two number in which member function definition outside the class
Expert's answer

#include <iostream>
#include <conio.h>
#include <time.h>
using namespace std;

class Number{
public:
int number;

};

//main function
int main()
{
Number num1;
Number num2;
num1.number=50;
num2.number=100;

int sum=0;
sum=num1.number+ num2.number;
cout<<sum;
getch();
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions