C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Question
Chapter 8.2, Problem 9E
(a)
Program Plan Intro
To create a file named as parts.dat and insert the given data in it without the headings.
(b)
Program Plan Intro
- Import header file and use namespace for standard I/O.
- Define the main function.
- Create the object of ifstream class and opening the file.
- Declare the variables.
- Display the header.
- Use the while-loop to iterateover the file to read the content.
- Calculate the current balance and the amount needed to bring the inventory.
Program description: -
The main purpose of the program is to read and display the content of the text file created in the exercise 9a also calculate the current balance and the amount to bring the inventory at minimum level.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
1)Use c code to add the function in the program to provide for purchase amount of RM80.00 or more, the delivery charge is waived and for purchase amount of RM100 or more, a 15% discount is given.
State whether each of the following is true or false. If false, explain why h) All arguments following the format control string in a printf function must be preceded by an ampersand (&).
Using the code and the function above
Chapter 8 Solutions
C++ for Engineers and Scientists
Ch. 8.1 - Prob. 1ECh. 8.1 - (Practice) a. Write a set of two statements...Ch. 8.1 - Prob. 3ECh. 8.1 - Prob. 4ECh. 8.1 - Prob. 5ECh. 8.1 - Prob. 8ECh. 8.1 - Prob. 9ECh. 8.1 - Prob. 10ECh. 8.2 - Prob. 1ECh. 8.2 - (Practice and modify) a. Enter and run Program...
Ch. 8.2 - (Practice and modify) a. Write a C++ program that...Ch. 8.2 - (Practice) Determine the OS command or procedure...Ch. 8.2 - Prob. 5ECh. 8.2 - (Data processing) a. Write a C++ program that...Ch. 8.2 - Prob. 7ECh. 8.2 - Prob. 8ECh. 8.2 - Prob. 9ECh. 8.3 - Prob. 1ECh. 8.3 - Prob. 2ECh. 8.3 - Prob. 3ECh. 8.3 - Prob. 4ECh. 8.3 - Prob. 5ECh. 8.3 - Prob. 6ECh. 8.4 - Prob. 1ECh. 8.4 - Prob. 2ECh. 8.4 - Prob. 3ECh. 8.4 - Prob. 4ECh. 8.5 - (Practice) Write a C++ program to create the...Ch. 8.5 - Prob. 2ECh. 8.5 - Prob. 3ECh. 8.5 - Prob. 4ECh. 8.5 - Prob. 5ECh. 8 - Prob. 1PPCh. 8 - (Data processing) a. Store the following data in a...Ch. 8 - (Data processing) Write a C++ program that allows...Ch. 8 - (Data processing) Write a C++ program that permits...Ch. 8 - (Data processing) Write a C++ program that reads...Ch. 8 - (Data processing) Write a C++ program that reads...Ch. 8 - Prob. 7PPCh. 8 - (Data processing) A bank’s customer records are to...Ch. 8 - (Inventory) Create an ASCII file with the...
Knowledge Booster
Similar questions
- (Practice) Run Program 7.10 to determine the average and standard deviation of the following list of 15 grades: 68, 72, 78, 69, 85, 98, 95, 75, 77, 82, 84, 91, 89, 65, and 74.arrow_forwardUrgent need in 10 min..otherwise i give you dislike. Write C# Program to Copy a Section of One Array to Another.arrow_forward(Physics) a. The weight of an object on Earth is a measurement of the downward force onth e object caused by Earth’s gravity. The formula for this force is determined by using Newton’s Second Law: F=MAeFistheobjectsweight.Mistheobjectsmass.AeistheaccelerationcausedbyEarthsgravity( 32.2ft/se c 2 =9.82m/ s 2 ). Given this information, design, write, compile, and run a C++ program to calculate the weight in lbf of a person having a mass of 4 lbm. Verify the result produced by your program with a hand calculation. b. After verifying that your program is working correctly, use it to determine the weight, on Earth, of a person having a mass of 3.2 lbm.arrow_forward
- C++ program chose the correct result for each of the following programming statementsarrow_forwardCan you provide a C++ code to include the a memory table for each function bot a and b and also int (main). Please show C++ codearrow_forwardProblem 1 (#2.1.8). Determine whether these statements are true or false. a) ∅ ∈ {∅} b) ∅ ∈ {∅,{∅}} c) {∅} ∈ {∅} d) {∅} ∈ {{∅}} e) {∅} ⊂ {∅,{∅}} f) {{∅}} ⊂ {∅,{∅}} g) {{∅}} ⊂ {{∅},{∅}}arrow_forward
- (General math) The volume of oil stored in an underground 200-foot deep cylindrical tank is determined by measuring the distance from the top of the tank to the surface of the oil. Knowing this distance and the radius of the tank, the volume of oil in the tank can be determined by using this formula: volume=radius2(200distance) Using this information, write, compile, and run a C++ program that accepts the radius and distance measurements, calculates the volume of oil in the tank, and displays the two input values and the calculated volume. Verify the results of your program by doing a hand calculation using the following test data: radius=10feetanddistance=12feet.arrow_forward(Physics) a. Design, write, compile, and run a C++ program to calculate the elapsed time it takes to make a 183.67-mile trip. This is the formula for computing elapsed time: elapsedtime=totaldistance/averagespeed The average speed during the trip is 58 mph. b. Manually check the values computed by your program. After verifying that your program is working correctly, modify it to determine the elapsed time it takes to make a 372-mile trip at an average speed of 67 mph.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning