Question
C++ Linda is starting a new cosmetic and clothing business and would like to make a net profit of approximately 10% after paying all the
C++
Linda is starting a new cosmetic and clothing business and would like to make a net profit of approximately 10% after paying all the expenses, which include merchandise cost, store rent, employees salary, and electricity cost for the store. She would like to know how much the merchandise should be marked up so that after paying all the expenses at the end of the year she gets approximately 10% net profit on the merchandise cost. Note that after marking up the price of an item she would like to put the item on 15% sale. Instructions Write a program that prompts Linda to enter: The total cost of the merchandise The salary of the employees (including her own salary) The yearly rent The estimated electricity cost. The program then outputs how much the merchandise should be marked up (as a percentage) so that Linda gets the desired profit. Since your program handles currency, make sure to use a data type that can store decimals with a decimal precision of 2.
My code that isn't working:
#include
#include
using namespace std;
int main() {
double cost_merchandise;
double salary_employees;
double rent_yearly;
double cost_electricity;
double profit = 0.1;
double sale = 0.15;
double total_expenses = 0;
double markup_price, mark_percentage = 0;
cout << "Enter the salary of employees"
<< "(including own's salary): ";
cin >> salary_employees;
cout << "Enter yearly rent: ";
cin >> rent_yearly;
cout << "Enter the estimated electricity cost: ";
cin >> cost_electricity;
total_expenses = cost_merchandise + salary_employees + rent_yearly + cost_electricity;
markup_price = (0.10*cost_merchandise+total_expenses)/0.85;
mark_percentage = (markup_price*100) / cost_merchandise;
cout << endl << setprecision(2) << fixed;
cout << "Markup_percentage: " << mark_percentage << " ";
return 0;
}
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