Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
image text in transcribed
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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Comment should this MNE have a global LGBT policy? Why/ why not?

Answered: 1 week ago