Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in C++ ONLY SOLVE #4 file is provided 3. Writing a list of sales Write a program that will open (create) a new file named
in C++ ONLY SOLVE #4 file is provided 3. Writing a list of sales Write a program that will open (create) a new file named "sales.txt", and will do this: a) Ask the user how many days of sales will be registered (integer). b) Write in the file this number in a single line. c) Make a loop for all days on which the program will: - Ask for the sales for the next day (float). - Write in the file a line with the sales. 4. Reading the list of sales Write a program that will open, for reading the file of the previous problem. a) The program will first read the number of days registered. b) With this number, use a loop for reading the file: - Displaying on the screen the sales of the next (aligned to the right, with a point). - Add to a total variable the sales cout "Einter the number of dya of sales you want registered: " > sale; zalespile sale
in C++ ONLY SOLVE #4 file is provided
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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