Question 1 [15] At Mthatha Airport to rent a car, it costs R4.50 per kilometre for each of the first 200 kilometres and

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Question 1 [15] At Mthatha Airport to rent a car, it costs R4.50 per kilometre for each of the first 200 kilometres and

Post by answerhappygod »

Question 1 15 At Mthatha Airport To Rent A Car It Costs R4 50 Per Kilometre For Each Of The First 200 Kilometres And 1
Question 1 15 At Mthatha Airport To Rent A Car It Costs R4 50 Per Kilometre For Each Of The First 200 Kilometres And 1 (99.72 KiB) Viewed 141 times
Please help with above two codes in c++ Urgently needed Thank you.
Question 1 [15] At Mthatha Airport to rent a car, it costs R4.50 per kilometre for each of the first 200 kilometres and R2.50 per kilometre for each kilometre over 200. Now, write a function called carrentalCost that takes the number of kilometres travelled as a parameter and returns the rental cost. Next, write the main program that uses the function carrentalCost. The program should read the number of kilometres from the keyboard and print out the car rental cost. The program should then read another number of kilometres from the keyboard and print the cost. The program should continue to read the number of kilometres from the keyboard, printing the cost until the number of kilometres entered is 0, then the program should stop. [15] Question 2 [25] Write a single program to do all of the following: First your program should declare an array of integers using an initializer list. Next, the program should sort the array into decreasing order. Then the program should print out the elements of the sorted list. Finally, the program should search the array to see whether integer 30 is present. [25]
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply