[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.11005002 [View]
File: 382 KB, 625x756, 1569381350290.png [View same] [iqdb] [saucenao] [google]
11005002

Can I get some help with a homework question guys? This is busting my ass, I've tried everything but it's still not right. I understand the programming but it's the math that's fucking me up.

here's the question

>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.

my code looks like this:

#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double cost;
double salary;
double rent;
double electricity;
double x;

cout << "Enter total cost of merchandise: " << endl;
cin >> cost;
cout << "Enter salary of employees: " << endl;
cin >> salary;
cout << "Enter rent: " << endl;
cin >> rent;
cout << "Enter Electric bill: " << endl;
cin >> electricity;
x = (cost + salary + rent + electricity);

cout << fixed << showpoint << setprecision(2);

double markup_percent = ((x * 1.1) / ( cost * 0.85) ) * 100.0;
cout << markup_percent;

return 0;
}


what the fuck am I doing wrong?

Navigation
View posts[+24][+48][+96]