Question

In: Computer Science

C++ application that calculates the sales at the end of the day. Need to know how...

C++ application that calculates the sales at the end of the day. Need to know how much money I made on selling my famous banana muffins each day. At the end of each day I must not only enter the number of banana muffins I sold but I must also enter the price of the banana muffins. Each day I have to experiment with changing the price in an attempt to maximize my revenues for his muffins.

I also want to know how much money I made on my famous chocolate cake that I bake. I must enter the quantity and price for my chocolate cake as well.

I must also enter my gross sales amount at the end of the day and then do a calculation to determine the percentage of my revenues for banana muffins and the percentage of revenue for my chocolate cake.

C++ application

Solutions

Expert Solution

Solution:

#include<iostream>
using namespace std;
int main()
{
   float bm,pbm,fc,pfc,perm,perc,gross;
  
   cout<<"Enter the number of banana muffins sold:";
   cin>>bm;
   cout<<"Enter price of a banana muffin:";
   cin>>pbm;
   cout<<"Enter the quantity of famous chocolate cake sold:";
   cin>>fc;  
   cout<<"Enter price for a chocolate cake:";
   cin>>pfc;
   cout<<"Enter your gross sales amount:";
   cin>>gross;
   perm=((bm*pbm)/gross)*100;
   perc=((fc*pfc)/gross)*100;
   cout<<"Percentage of revenue for banana muffin is "<<perm<<" %\n";
   cout<<"Percentage of revenue for chocolate cake is "<<perc<<" %\n";
   return 0;
}

Output:


Related Solutions

How can we write an application that calculates connascence of an application?
How can we write an application that calculates connascence of an application?
***IN C# ONLY, USING WINDOWS FORMS*** --NO JAVA--. Create a GUI application in C# that calculates...
***IN C# ONLY, USING WINDOWS FORMS*** --NO JAVA--. Create a GUI application in C# that calculates and displays the total travel expenses of a business person on a trip. Here is the information that the user must provide: • Number of days on the trip • Amount of airfare, if any • Amount of car rental fees, if any • Number of miles driven, if a private vehicle was used • Amount of parking fees, if any • Amount of...
In C# Create a GUI application that calculates and displays the total travel expenses of a...
In C# Create a GUI application that calculates and displays the total travel expenses of a business person on a trip. Here is the information that the user must provide: Number of days on the trip Amount of airfare, if any Amount of car rental fees, if any Number of miles driven, if a private vehicle was used Amount of parking fees, if any Amount of taxi charges, if any Conference or seminar registration fees, if any Lodging charges, per...
C# A car dealer wants an application that calculates the cost of a car. The GUI...
C# A car dealer wants an application that calculates the cost of a car. The GUI application should link the “BuildYourCar.accdb” database and display all the data in four different “ListBox” based on the category. Each “ListBox” should display all the items in that category. The user can only choose one item from each “ListBox” to add an item to a car. As each item is selected, the application displays the item in a separate “ListBox” to display. If user...
Create a GUI application in C# that calculates and displays the total travel expenses of a...
Create a GUI application in C# that calculates and displays the total travel expenses of a business person on a trip. Here is the information that the user must provide: • Number of days on the trip • Amount of airfare, if any • Amount of car rental fees, if any • Number of miles driven, if a private vehicle was used • Amount of parking fees, if any • Amount of taxi charges, if any • Conference or seminar...
Create a C # program that calculates what a worker must be paid if each day...
Create a C # program that calculates what a worker must be paid if each day I work different hours during the week. The price per hour is 80.0.
You've been hired by Yogurt Yummies to write a C++ console application that calculates and displays...
You've been hired by Yogurt Yummies to write a C++ console application that calculates and displays the cost of a customer’s yogurt purchase. Use a validation loop to prompt for and get from the user the number of yogurts purchased in the range 1-9. Then use a validation loop to prompt for and get from the user the coupon discount in the range 0-20%. Calculate the following:         ● Subtotal using a cost of $3.50 per yogurt.         ● Subtotal...
Create an Investment application that calculates how many years it will take for a $2,500 investment...
Create an Investment application that calculates how many years it will take for a $2,500 investment to be worth at least $5,000 if compounded annually at 7.5% ( Java Programming)
Lab 10-2:You've been hired by Yogurt Yummies to write a C++ console application that calculates and...
Lab 10-2:You've been hired by Yogurt Yummies to write a C++ console application that calculates and displays the cost of a customer’s yogurt purchase. Use a validation loop to prompt for and get from the user the number of yogurts purchased in the range 1-9. Then use a validation loop to prompt for and get from the user the coupon discount in the range 0-20%. Calculate the following:           ● Subtotal using a cost of $3.50 per yogurt. ● Subtotal...
Operation  This application calculates the charges for a stay at a hotel based on the...
Operation  This application calculates the charges for a stay at a hotel based on the arrival and departure dates.  The application begins by prompting the user for the month, day, and year of the arrival and the departure.  Next, the application displays the arrival date, the departure date, the room rate, the total price, and the number of nights. Specifications  Create a class named Reservation that defines a reservation. This class should contain instancevariables for the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT