Question
These are the two problems I'm working with in C++. I have the output problem solved and now I am attempting to read in the
These are the two problems I'm working with in C++. I have the output problem solved and now I am attempting to read in the file created from this first problem, and then calculate the data.
Corporate Sales Data Output
Write a program that uses a structure to store the following data on a company division:
Division Name (such as East, West, North, or South)
Quarter (1, 2, 3, or 4)
Quarterly Sales
The user should be asked for the four quarters sales figures for the East, West, North, and South divisions. The data for each quarter for each division should be written to a file.
Input Validation: Do not accept negative numbers for any sales figures.
Corporate Sales Data Input
Write a program that reads the data in the file created by the program in Programming Challenge 11. The program should calculate and display the following figures:
Total corporate sales for each quarter
Total yearly sales for each division
Total yearly corporate sales
Average quarterly sales for the divisions
The highest and lowest quarters for the corporation
-----------------------------------------------------------------------------
I have done the first problem, the Corporate Sales Data Output.
I am not sure how to read the file in from the output problem, and then perform the functions it asks for in the Input problem.
This is what I have for the Output problem:
cout<<"Corporate Sales Data Output"<
-------------------------------------------------------------------------
------------------------------------------------------------------------
This is what I have for the input problem so far:
cout<<"Corporate Sales Data Input"<
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started