The revenue generated

Suppose that you have the following statements: (10)

ofstream outfile;

int numOfJuiceBottlesSold = 35;

double costOfaJuiceBottle = 0.75;

double revenue;

Use this information and write C11 statements to do the following:

a. Open the file sales.dat using the variable outfile.

b. Write the statement to format the output in the outfile to two decimal places in fixed form.

c. Calculate and store the revenue generated by selling the juice bottles in the variable revenue.

d. Write the values of the variables numOfJuiceBottlesSold and costOfaJuiceBottle, and revenue in the file sales.dat.

e. Write a statement to close the file sales.dat

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

🛡️ Worried About Plagiarism? Run a Free Turnitin Check Today!
Get peace of mind with a 100% AI-Free Report and expert editing assistance.

X