Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions

Question

3. Identify and describe nine cultural value orientations.

Answered: 1 week ago