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