Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ please 1. Write a program that a function that takes an item's wholesale cost and its markup percentage and returns the item's retail cost.
C++ please
1. Write a program that a function that takes an item's wholesale cost and its markup percentage and returns the item's retail cost. For example, if an item's wholesale cost is $5 and the markup is 100%, the item's retail price is $10.00. Use the function in a program.
2. Write a function that simulates a coin toss. The function should return either heads or tails based on a random number. The possible random numbers are 1 for heads and 2 for tails. Write a program that calls the function 100 times and counts the number of heads and tails.
3. Write a Boolean function that determines if a number is even or odd. Use the function in a program.
4. Write a function that determines if a letter in a string is a consonant. Use the function to count the number of consonants in any string passed to the function.
5. Write a function that takes a numeric grade and returns the letter grade of the numeric grade, using a 90,80,70,60 grading scale.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started