Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Q1.Write a program that includes the following stream manipulators: (28 marks) a. setw() b. setprecision() c. fixed d. getline() 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): 9 0 0 . 3 7 Monthly salary (3rd): 1 2 0 0 0 . 0 0 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

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

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

a. How will the leader be selected?

Answered: 1 week ago