Write a C++ program that helps a business owner figure out what final price they should sell an item at. It should prompt the user to enter the price that they paid for an item and the percent markup (or percent profit) that they want to make. Then, it should calculate and output the final price that the business owner should sell it at. SAMPLE OUTPUT Welcome business owner! How much did you pay for the item? 250 What percent markup do you want? 35 OK! Here is the final price you should charge: $337.50 Here is how i proceed. However, the final answer does not display. Please help me. // This program is to help a business owner figure out the final price to sell an item. double price_of_the_item; double percent_markup; // divide the percent markup by 100. double final_price_to_sell; double markup; // Calculate the markup from the percent markup. markup = price_of_the_item * 0.35; // This is a welcoming header for the bussiness. std:: cout << " Welcome bussiness owner!"; std:: cout << "\n\n"; // The user needs to enter a number. std:: cout << " How much did you pay for the item? "; std:: cin >> price_of_the_item; std:: cout << "\n\n"; // The user needs to enter a number. std:: cout << " What percent markup do you want? "; std:: cin >> percent_markup; std:: cout << "\n\n"; // Calculate the final price to sell the item. final_price_to_sell = price_of_the_item + markup; // Display the final price the bussiness owner should sell the item. std:: cout << " Ok! Here is the final price you should sell the item: " << final_price_to_sell << " $ "; return 0;
Write a C++
SAMPLE OUTPUT
Welcome business owner!
How much did you pay for the item? 250
What percent markup do you want? 35
OK! Here is the final price you should charge: $337.50
Here is how i proceed. However, the final answer does not display. Please help me.
// This program is to help a business owner figure out the final price to sell an item.
double price_of_the_item;
double percent_markup; // divide the percent markup by 100.
double final_price_to_sell;
double markup;
// Calculate the markup from the percent markup.
markup = price_of_the_item * 0.35;
// This is a welcoming header for the bussiness.
std:: cout << " Welcome bussiness owner!";
std:: cout << "\n\n";
// The user needs to enter a number.
std:: cout << " How much did you pay for the item? ";
std:: cin >> price_of_the_item;
std:: cout << "\n\n";
// The user needs to enter a number.
std:: cout << " What percent markup do you want? ";
std:: cin >> percent_markup;
std:: cout << "\n\n";
// Calculate the final price to sell the item.
final_price_to_sell = price_of_the_item + markup;
// Display the final price the bussiness owner should sell the item.
std:: cout << " Ok! Here is the final price you should sell the item: " << final_price_to_sell << " $ ";
return 0;
Step by step
Solved in 3 steps with 1 images