Price Markup
Write a program that asks the user to enter an item’s wholesale cost and its markup
percentage. It should then display the item’s retail price. For example:
The program should have a function named calculateRetail that receives the
wholesale cost and the markup percentage as arguments and returns the retail price of
the item.
NO PDF
Answer: Hello!! Dear student, kindly find your solution below. Let me know if any issue. Thanks. As you mentioned in question there should be a function to calculate retail price so i thought program should be in c++.
#include <iostream>
#include<iomanip>
using namespace std;
//function
float calculateRetail(float wholesale,int
markup)//arguments
{
float markup_percent,retail_price;
markup_percent = markup*0.01;
retail_price = wholesale+(markup_percent*wholesale);
return retail_price; //return retail price
}
int main() //main function
{
float cost_wholesale,price_retail;
int markup;
cout<<"Enter the wholesale cost of item: ";
cin>>cost_wholesale;
cout<<endl<<"Enter the markup percent: ";
cin>>markup;
price_retail=calculateRetail(cost_wholesale,markup);
cout<<endl<<"The retail price of item is:
"<<price_retail;
return 0;
}
Price Markup Write a program that asks the user to enter an item’s wholesale cost and...
1. Markup Write a program that asks the user to enter an item's wholesale cost and its markup percentage. 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 . If an item's wholesale cost is $5.00 and its markup percentage is 50 percent, then The program should have a function named calculateReta1l that receives the wholesale the item's retail price is $10.00. the...
You are to write a program IN C++ that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: if the an item's wholesale cost is 5.00 and its markup percentage is 100%, then the item's retail price is 10.00 If an item's wholesale cost is 5.00 and its markup percentage is 50%, then the item's retail price is 7.50 Program design specs. You should have 5...
Python Programming 4th Edition: Write a program that asks the user for the number of feet. The program converts those feet to inches by using the formula ’12 * feet’. Hint: Define main () program Get the number of feet from the user Define variables Call a function feet_to_inches(feet) The function receives the number of feet and returns the number of inches in that many feet. The output should look like as follows: Enter the number of feet: If the...
Write a program that asks the user to enter a string and then asks the user to enter a character. The program should count and display the number of times that the specified character appears in the string. python programming
Write a program that asks the user to enter the types of dark chocolate and the number of packages purchased at the SHSU@ACM freshly made store. Make sure that you display the following chart for the user to make the selection. The plain base chocolate cost $5.00. The flavor and sweetness can be added to add on various rate. Chocolate Intensity Percentage Flavor & Sweetness Cost Rate 1 - 25% Super Sweet 10% 26 - 50% ...
Write a Python program that asks the user to enter the number of calories and fat grams in a food item. The program should display the percentage of the calories that come from fat. One gram of fat has 9 calories, therefore: Calories from fat = fat grams * 9 The percentage of calories from fat can be calculated as follows: Calories from fat / total calories If the calories from fat are less than 30 percent of the total...
Write a java program that asks the user to enter an integer. The program should then print all squares less than the number entered by the user. For example, if the user enters 120, the program should display 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, and 100.
Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Design the following functions in the program: calcAverage—This function should accept five test scores as arguments and return the average of the scores. determineGrade—This function should accept a test score as an argument and return a letter grade for the score (as a String), based on the following grading scale: Score Letter Grade...
Starting Out with C++ (9th Edition) Chapter 4, Problem 7PCWrite a program that asks the user to enter a number of seconds.• There are 86400 seconds in a day. If the number of seconds entered by the user is greater than or equal to 86400, the program should display the number of days in that many seconds.• There are 3600 seconds in an hour. If the number of seconds entered by the user is less than 86400, but is greater...
***** JAVA ONLY ***** Write a program that asks the user to enter the name of a file, and then asks the user to enter a character. The program should count and display the number of times that the specified character appears in the file. Use Notepad to create a simple file that can be used to test the program. ***** JAVA ONLY *****