Question: in c + + Create a class with following characteristics First constructor accepts two integer parameters N 1 and N 2 and displays addition of

in c++Create a class with following characteristics
First constructor accepts two integer parameters N1 and N2 and displays addition of 2 numbers.
Second constructor accepts three integer parameters N1, N2 and N3 and displays addition of 3 numbers.
Input
10
20
45
where
First line represents a value of N1.
Second line represents a value of N2.
Thrid line represents a value N3.
Output
30
75
#include
#include
#include
using namespace std;
int main(){
int N1,N2,N3;
cin >> N1;
cin >> N2;
cin >> N3;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!