Question: (28 marks) Q1. Write a program that includes the following stream manipulators: a. setw() b. setprecision() C. fixed d. getline() I Your program should prompt


(28 marks) Q1. Write a program that includes the following stream manipulators: a. setw() b. setprecision() C. fixed d. getline() I Your program should prompt the user to enter 3 records as follow: Lina 9, Jalan Indah 2/8, Taman Skudai, 81200, JB. Alex 12, Jalan Scientax, Blok 3, Taman Pulai, 81100, JB. Ellen 9, Blok B, School of Computing, Faculty of Engineering, 81310, JB. 1 2 0 0 0 0 0 The information key-in by the user as above should then saved in file named as address.txt. After that, you need to save the monthly salaries of Lina, Alex and Ellen as 5000.4678, 900.365 and 12000 as separated line as follow in address.txt: Monthly salary (1st): 5 0 0 0 4 7 Monthly salary (2nd): 900. 37 Monthly salary (3rd): 1 2000.00 Q2. From the program you created in Q1, you need to create a function before the main function to read all the records except the salary information in address.txt and display on screen. (7 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
