Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

By Using C++ Programming Language... 7 Write the program that calculates the sum of 10 numbers that will be stored an array as the power

By Using C++ Programming Language... image text in transcribed

7 Write the program that calculates the sum of 10 numbers that will be stored an array as the power of each of its index number. 8. Write a function called parkingCharge () that given the type of vehicle (c' for car, 'b' for bus, 'l' for truck) and the hours a vehicle spent in the parking lot, returns the parking charge based on the rate shown below. Car RM 2 per hour Bus RM 3 per hour Truck RM 4 per hour 9. Improve the Program Example given before so that it can print and calculate the total and average in another function. Tips: Besides main function, there is one more function in this program. The function created must receive an array from main. The price, unit, cost and total value must be printed in the function while the average value must be printed in main function. Submit the program including comments in the code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

More Books

Students also viewed these Databases questions