2. Retail Price Calculator VideoNote The Retail Price Calculator Problem Write a
ID: 671559 • Letter: 2
Question
2. Retail Price Calculator VideoNote The Retail Price Calculator Problem Write a program that asks the user to enter an item’s wholesale cost and its markup percent- age. It should then display the item’s retail price. For example: If an item’s wholesale cost is 5.00 and its markup percentage is 100 percent, then the item’s retail price is 10.00. If an item’s wholesale cost is 5.00 and its markup percentage is 50 percent, then the item’s retail price is 7.50. The program should have a method named calculateRetail that receives the wholesale cost and the markup percentage as arguments, and returns the retail price of the item.
Explanation / Answer
working c++ code
#include<iostream>
double calculateRetail(double wh, double mup)
{
return (wh + (mup*wh/100));
}
int main()
{
double wholecost;
cout<<"enter whole sale cost ";
cin>>wholecost;
double markuppercent;
cout<<"enter mark up percentage ";
cin>>markuppercent;
double final;
final = calculateRetail(wholecost,markuppercent);
cout<<"Item's retail price is " << final<<endl;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.