Question
C++: The Rinky Dooflingy Company currently sells 200 dooflingies per month at a profit of $300 per dooflingy. The company now spends $2000 per month
C++:
The Rinky Dooflingy Company currently sells 200 dooflingies per month at a profit of $300 per dooflingy. The company now spends $2000 per month on advertising and has a fixed operating cost of $1000 per month that does not depend on volume of sales. If the company doubles the amount spent on advertising, studies show that sales will increase by 20 percent.
Write a program that produces a table with appropriate headings for the amount spent on advertising, the number of sales expected, and the net profit for those sales. Begin with the companys current status and successively double the amount spent on advertising until the net profit ceases to rise and begins to decline. The output should include the amounts up through the first time the net profit begins to decline. Make sure your output is in dollars and cents.
So far I have this, can someone help me fix it?
#include
using namespace std;
int main()
{
//Declare Variables
int ads = 2000;
int sales = 200;
int expenses = 1000;
int profit;
int new_sales;
int new_ads;
int new_profit;
cout << "Your current standings are " << endl;
cout << sales << " sales" << endl;
cout << "$" << ads << " in advertising costs" << endl;
profit =(sales*300) - expenses;
cout << "and $" << profit << " in profit" << endl;
while (new_profit > profit)
{
cout << "Your new standings are" << endl;
new_sales = sales + (sales*.2);
new_profit = new_sales*300;
cout << new_sales << " sales" << endl;
cout << "$" << new_ads << " in advertising costs" << endl;
cout << " and $" << new_profit << " in profit" << endl;
}
}
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