Chapter 3 Lab Exercises

User Generated

yvyzrpur101

Programming

Description

Write C++ Program. Visual Studios Win32 - Please provide copies of programs and outputs

#5. The manager of a football stadium wants you to write a program that
calculates the total ticket sales after each game. There are four types of
tickets—box, sideline, premium, and general admission. After each game,
data is stored in a file in the following form:
ticketPrice numberOfTicketsSold
...
Sample data are shown below:
250 5750
100 28000
50 35750
25 18750

The first line indicates that the ticket price is $250 and that 5750 tickets were
sold at that price. Output the number of tickets sold and the total sale amount.
Format your output with two decimal places.

#6. Three employees in a company are up for a special pay increase. You are given a file, Ch3_Ex6Data.txt, with the following data:

Miller Andrew 65789.87 5

Green Sheila 75892.56 6

Sethi Amit 74900.50 6.1

Each input line consists of an employee's last name, first name, current salary, and percent pay increase. For example, in the first input line, the last name of the employee is Miller, the first name is Andrew, the current salary is 65789.87, and the pay increase is 5%. Write a program that reads data from the specified file and stores the output in the file Ch3_Ex6Output.dat. For each employee, the data must be output in the following form: firstName lastName updatedSalary. Format the output of decimal numbers to two decimal places.

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Attached.
Hello buddy. I have finished the assignment. Thank you for giving me that opportunity to work with you.

Program Pseudo Code
/*Variable declaration*/
Declare counter AS Integer = 0
Declare quizGrade AS String []
Declare studName AS String []
Declare StudentID AS String []
Declare Grade AS c...


Anonymous
Awesome! Perfect study aid.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags