What is wrong in my code..? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
5th Apr 2020, 7:27 AM
manojkdm18
manojkdm18 - avatar
2 Answers
+ 8
Okay..I understood well.. thank u.. Abirame Dhevendran
5th Apr 2020, 9:44 AM
manojkdm18
manojkdm18 - avatar
+ 2
The add and sub methods are returning an int. You have to store in in an int variable. In line 27 and 28 int sum = d.sum(a,b); int sub = d.sub(a,b); The sum and the difference value will be stored in those two variables. You can print those variables if you want to view them in the output.
5th Apr 2020, 7:40 AM
Abirame Dhevendran
Abirame Dhevendran - avatar