1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vesna [10]
4 years ago
8

sure the provided file named Furniture.cpp is open. The file includes variable declarations and output statements. Read them car

efully before you proceed to the next step. Design the logic and write the C++ code that will use assignment statements to: Calculate the profit (profit) as the retail price minus the wholesale price Calculate the sale price (salePrice) as 25 percent
Computers and Technology
1 answer:
larisa [96]4 years ago
7 0

This question is incomplete. The complete question is given below:

In this lab, you complete a partially written C++ program that is provided for you. The program, which was written for a furniture company, prints the name of the furniture item, its retail price, its wholesale price, the profit made on the piece of furniture, a sale price, and the profit made when the sale price is used.

Instructions

Ensure the provided file named Furniture.cpp is open.

The file includes variable declarations and output statements. Read them carefully before you proceed to the next step.

Design the logic and write the C++ code that will use assignment statements to:

Calculate the profit (profit) as the retail price minus the wholesale price

Calculate the sale price (salePrice) as 25 percent deducted from the retail price

Calculate the sale profit (saleProfit) as the sale price minus the wholesale price.

Execute the program by clicking the Run button. Your output should be as follows:

Item Name: TV Stand

Retail Price: $325

Wholesale Price: $200

Profit: $125  

Sale Price: $243.75

Sale Profit: $43.75

Code

// This program calculates profits and sales prices for a furniture company.

#include <iostream>

#include <string>

using namespace std;

int main()

{

string itemName = "TV Stand";

double retailPrice = 325.00;

double wholesalePrice = 200.00;

double salePrice;

double profit;

double saleProfit;

     

// Write your assignment statements here

     

cout << "Item Name: " << itemName << endl;

cout << "Retail Price: $" << retailPrice << endl;

cout << "Wholesale Price: $" << wholesalePrice << endl;

cout << "Profit: $" << profit << endl;  

cout << "Sale Price: $" << salePrice << endl;

cout << "Sale Profit: $" << saleProfit << endl;

return 0;

Answer:

#include <iostream>

#include <string>

#include <iomanip>

using namespace std;

int main()

{

  string itemName = "TV Stand";

  double retailPrice = 325.00;

  double wholesalePrice = 200.00;

  double salePrice;

  double profit;

  double saleProfit;

  profit=retailPrice-wholesalePrice;

  salePrice=retailPrice-retailPrice*.25;

  saleProfit=salePrice-wholesalePrice;

  cout<<fixed<<setprecision(2);

  cout << "Item Name: " << itemName << endl;

  cout << "Retail Price: $" << retailPrice << endl;

  cout << "Wholesale Price: $" << wholesalePrice << endl;

  cout << "Profit: $" << profit << endl;

  cout << "Sale Price: $" << salePrice << endl;

  cout << "Sale Profit: $" << saleProfit << endl;

  return 0;

}

Explanation:

  • Calculate profit on retailPrice by subtracting wholesalePrice from the retailPrice.
  • set salePrice as 25% by multiplying it with 0.25.
  • Calculate the profit on sale price by subtracting wholesalePrice from the salePrice.  
  • Finally print the values of item name, retail price, wholesale price, profit, sale price and sale profit respectively.

You might be interested in
What should a valid website have?
zzz [600]
The answer is A.....
4 0
3 years ago
1.) Write the formula, which assigns double x to double n raised to the double z power.
andrezito [222]

Answer:

1.) Write the formula, which assigns double x to double n raised to the double z power.

Answer: 2\times x → 2\times n^(2\times z<u>)</u>

2.) Write a formula, which will add 5 to the cube of double t times double n, and assign it to double x.

Answer: 5\plus 2\times t^3→2\times x

3.) Write a formula, which will assign double x to square root of the sum of the squares of the lengths of the two legs of a triangle. Declare double leg1, and double leg2, in order to find the hypotenuse. (Pythagorean Theorem)

Answer: 2\times x → \sqrt \{(l^2)_1 + (l^2)_2\}= hypotenuse

4.) Write a program that find the distance between two values on the number line by taking the absolute value of their difference. Assign the answer to double x. The two numbers have been declared as follows:

double num1, num2

Answer: length = \sqrt\{|num2 - num1\|} → 2\times x

Explanation:

.

3 0
3 years ago
After accessing notes in the Navigation bar, what are the steps to creating a new Outlook note?
shtirl [24]

Answer:

yes, the correctly marked bottom one is correct

Explanation:

5 0
2 years ago
The tuna marketers' task in the "tunathewonderfish.com" website and related campaign was to ________.
Wewaii [24]
The answer to this question is "to monitor all the elements of the marketing mix for a Oregon winery". This is the main task of the tuna marketer's task in the emailing or website which is very known s tunwonderfish.com and this compaign was exclusively related to the elements of mixing in a large Oregon winery but not including the production.
4 0
4 years ago
Of the following, which would be the least important skill for an A/V technician to have? creative thinking interpersonal skills
kotykmax [81]

Answer:

C.self-defense skills

Explanation:

Just took the test

3 0
4 years ago
Other questions:
  • What tool enables you to easily delete, add, or resize filesystems without regard to their physical locations on a hard disk?
    13·1 answer
  • ANSWER QUICKLY!
    10·1 answer
  • Which of the following is something you need to keep an eye out for
    7·2 answers
  • What is true about content based filtering
    8·1 answer
  • What games do you play?<br><br><br> Be sure not to report any answers!
    5·1 answer
  • Which statement is accurate to describe a spreadsheet versus an Excel workbook?
    9·1 answer
  • you need to configure a wireless network using wpa2-enterprise. which of the following components should be part of your design?
    13·1 answer
  • Try using the index method yourself now! Using the index method, find out the position of "x" in "supercalifragilisticexpialidoc
    9·1 answer
  • There is overlap in the subjects of study in the different information technology disciplines.
    5·2 answers
  • Consider the following variable declarations and initializations.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!