I have an example from the book Malik: C++ programing from problems analysis to program design, page 430, exercise 11. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I have an example from the book Malik: C++ programing from problems analysis to program design, page 430, exercise 11.

https://code.sololearn.com/cXTWv4Ty3tGl/?ref=app

17th Oct 2020, 6:34 PM
TeaserCode
2 Answers
+ 2
You are passing values in wrong matching, not according to requirement.. From the function sent values, 1st argument is copied to 1st argument in function defination, 2nd to 2nd,. 3rd to 3rd... So in your code session is copied to discount.. Similarly other. And costofMembership, discount,sessions are uninitialized values you are passing.. It may take garbage values if you use so it lead wrong result. Take inputs or set default values..
17th Oct 2020, 9:49 PM
Jayakrishna 🇮🇳
0
Если сидишь на Visual studio используй отладчик. Очень полезная штука, без неё ни куда. If you are using Visual studio use the debugger.
17th Oct 2020, 7:40 PM
Rustam Yumagujin
Rustam Yumagujin - avatar