Computer Science, asked by azharuddinuddin42, 8 months ago

Write a class named Number. the number class should include one integer Data member "no". the Number should contain the following methods .
a) Constructor to initialize no.
b) overload operator +, - , *
and show function to show the result.
write a main function. in main function create two object from the above class and and perofrm the following expression . 
n1 = n1+n2*n3
after thois show n1 object value. 

Answers

Answered by aru2398
2

Write a class named Number. the number class should include one integer Data member "no". the Number should contain the following methods .

a) Constructor to initialize no.

b) overload operator +, - , *

and show function to show the result.

write a main function. in main function create two object from the above class and and perofrm the following expression . 

n1 = n1+n2*n3

after thois show n1 object value. 

Similar questions