C++ for Engineers and Scientists
C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
Question
Book Icon
Chapter 8.2, Problem 7E

(a)

Program Plan Intro

To create a file named as info.dat and insert the given data without the headings.

(b)

Program Plan Intro

Program plan: -

  • Import header file and use namespace for standard I/O.
  • Define the main function.
  • Create the object of fstream class and opening the file.
  • Declare the variables.
  • Display the header.
  • Use the while-loop to iterateover the file to read the content.
  • Display the SSN, first name, last name and gross pay.

Program description: -

The main purpose of the program is to read and display the content of the text file created in the exercise 7a also calculate the gross pay by the below formula:

  grosspay=hourlyrate×hoursworked

Blurred answer
Students have asked these similar questions
pattern recognitionPCA algor'thm
Consider the following program: LOAD AC, IMMEDIATE(30)                                                     ADD AC, REGISTER(R1)                                                     STORE AC, MEMORY(20) Given that the value of R1 is 50, determine the value stored at memory address 20 after the program is executed. Provide an explanation to support your answer.
Pattern RecognitonDecision Tree please write the steps not only last answer
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education