Question
Write a program that read file MajuSales.txt as given. Your program should do the following: 1) Check the file existence 2) Read year and sales
Write a program that read file MajuSales.txt as given. Your program should do the following: 1) Check the file existence 2) Read year and sales of each quarter and stored the data in array of struct 3) Display total sales of each year and average sales of each quarter 4) Use pointer with struct to refer to the field of each struct. 5) Create at least one function that uses a pointer as a parameter. For example pass address of an element of the array of struct to a function, and use selection operator in the function definition
--------------------------------------------- Sales of Maju Sdn. Bhd. Company (in millions) --------------------------------------------- Year/Quarter Quarter1 Quarter2 Quarter3 Quarter4 2020 1.2 1.3 1.35 1.4 2021 1.3 1.45 1.51 1.53 2022 1.5 1.55 1.58 1.63 2023 1.6 1.66 1.7 1.8
using c++
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