Question: c++ code please Question 3 [20 marks: Suppose you are given a text file named Cars, in which each line of the file contains the

c++ code please c++ code please Question 3 [20 marks: Suppose you are given a

Question 3 [20 marks: Suppose you are given a text file named "Cars", in which each line of the file contains the model, year and price of a car, separated by ". Your program should read the "Cars" file and save the data into another text file named "Result", such that the car price of year 2019 should be increased by 5%. Also, output the number of cars with updated prices, as shown in the example below. Cars.txt Result.txt Patrol:2019,20000.000 Patrol:2019;21000.000 Corrolla;2018;6000.000 Corrolla;2018;6000.000 Yaris;2019;7500.000 Yaris;2019;7875.000 Mazda6,2017;8000.000 Mazda6,2017;8000.000 Number of cars with updated prices = 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!