0
I have an example from the book Malik: C++ programing from problems analysis to program design, page 430, exercise 11.
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..
0
ŠŃŠ»Šø ŃŠøŠ“ŠøŃŃ Š½Š° Visual studio ŠøŃŠæŠ¾Š»ŃŠ·ŃŠ¹ Š¾ŃŠ»Š°Š“ŃŠøŠŗ. ŠŃŠµŠ½Ń ŠæŠ¾Š»ŠµŠ·Š½Š°Ń ŃŃŃŠŗŠ°, Š±ŠµŠ· Š½ŠµŃ Š½Šø ŠŗŃŠ“Š°.
If you are using Visual studio use the debugger.