Question about C++ program
Feb 25, 2015 at 7:59pm UTC
Write your question here.
This is my first programming class and I am having a problem running this code, I am not receiving any errors, however when I run the code it is not computing the calculations. I am looking to output how much the merchandise should be marked up.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double merchandise_Cost;
double salary;
double rent;
double electric;
double expenses;
double profit_Markup;
double sale_Markup;
double sale_Price;
cout << "Enter merchandise cost: " << endl;
cin >> merchandise_Cost;
cout << "Enter salary of all employees, including yourself: " << endl;
cin >> salary;
cout << "Enter rent amount: " << endl;
cin >> rent;
cout << "Enter Electric bill amount: " << endl;
cin >> electric;
cout << endl << endl;
expenses = salary + rent + electric + merchandise_Cost;
profit_Markup = expenses * .10;
sale_Markup = (expenses + profit_Markup) * .15;
sale_Price = expenses + profit_Markup + sale_Markup;
cout << "Your sale_Markup for desired profit is: " ;
cin >> sale_Markup;
return 0;
}
Put the code you need help with here.
Feb 25, 2015 at 8:05pm UTC
You never cout the sale_Markup, but you cin it, which kinda makes no sense.
1 2
cout << "Your sale_Markup for desired profit is: " ;
cout << sale_Markup << endl;
Thats how you want it to be. And if you want to print out the sale_price you pretty much do the same.
Feb 27, 2015 at 2:27pm UTC
Thank you for the help.
Feb 27, 2015 at 6:16pm UTC
My pleasure :)
Topic archived. No new replies allowed.