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
At the county fair, prizes are awat rded to the five heaviest cows. More than 2000 cows are entered, and their records are store
Sergeu [11.5K]

Answer:

B

Explanation:

selection sort for each pass sorts one element in right place . so we can stop it after 5 passes as we need only 5 heaviest cows info.

Answer is B

6 0
3 years ago
Hurry asap it’s times
Eddi Din [679]

Answer:

C and B.

Explanation:

6 0
3 years ago
________ allows only limited use of media that has been legally purchased.
Reptile [31]
Digital Rights Management (DRM) allows only limited use of media that has been legally purchased. The DRM includes access control technologies for <span>copyright protection for </span>digital media. DRM defines <span>what you as a software or hardware user can and can't do with the media and hardware you've purchased. </span> 
3 0
4 years ago
What keyboard shortcut is used to move the cursor to the beginning or end of a document.
TiliK225 [7]
Ctrl+Home moves the cursor to the beginning of the document, and Ctrl+End moves the cursor to the end of a document. These shortcuts work with most documents, as well as web pages.
7 0
4 years ago
python If the checksum is 10, the last digit is denoted as X according to the ISBN-10 convention. Write a program that prompts t
aksik [14]

Answer:

PYTHON CODE:

str = input("Enter the first 9 digits of an ISBN-10 as a string : ") # user input

i = 1

checksum = 0 # for total sum

while i < 10:

c = int(str[i - 1]) # getting every digit of the ISBN

c = c * i

checksum += c

i=i+1

checksum=checksum % 11 # getting the last digit of ISBN

ch=checksum

if checksum==10: # if the last digit is 10 then change it to X

ch="X"

print("The Complete 10-Digit ISBN is : ",end="")

print(str,end="") # displaying the 9 digit of ISBN

print(ch) # appending the last digit of ISBN

Explanation:

3 0
3 years ago
Other questions:
  • Write a program that will calculate the following function:
    14·1 answer
  • Question 1
    9·1 answer
  • A video-streaming Web site uses 32-bit integers to count the number of times each video has been played. In anticipation of some
    11·1 answer
  • To close a tab, click the ____ button in the web page thumbnail on the tab switcher.
    9·1 answer
  • In one to two sentences, explain how to save a new document.
    15·2 answers
  • Because of Moore's Law, widely-used encryption programs currently employed by banks and ecommerce sites are now easily penetrate
    11·1 answer
  • Write a program in Cto define a structure Patient that has the following members
    12·1 answer
  • Select the correct answer.
    9·1 answer
  • Do OBS mic filters apply everywhere? Such as discord and other apps similar. Or is it just on streaming?
    15·1 answer
  • What are the key constructs of a G&amp;T Value Delivery objective?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!