I am a beginner of C++.
i want to print out the list like the following

but what i get is this

and this is my code


It looks like i did something wrong when i trying to assign the value that i calculated to the array rent[]...

please help.
i will be appreciated.

Recommended Answers

All 2 Replies

Your not passing the rent array to calculateRental...Also the first array element starts at zero not 1.

Your not passing the rent array to calculateRental...Also the first array element starts at zero not 1.

oh...for me the reason i starts my array at 1 is because my customer number starts at 1.

Thank you soooooo much! it works ^^" you are my life saver!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.