The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 364 Weeks Ago, 2 Days Ago |
| Questions Answered: | 1850 |
| Tutorials Posted: | 1850 |
Graduate in Biology and Nutrition, MBA Finance
Florida State University
Aug-2000 - Jul-2007
Ass. Relationship Manager
Penn-Florida
Mar-2009 - Feb-2016
Simple C++ coding questions.
1.
Define a function that prompts the user for a positive number and continues to prompt the user until they enter a positive number. The function then returns the value the user entered.
Use Prompt : “Please enter a Positive Number:”
Use int askTheUser() to define your function.
Note: You do not need to write the main(), the include, or namespace commands, you only need to write the function.
2.
Write a function that calculates the area of a circle. Your function should take the radius of the circle as an argument and return the area using the formula area = pi * r^2. Use 3.14 for pi, and use the following function header: float circleArea(float radius)
Note: You do not need to write the main(), the include, or namespace commands, you only need to write the function.
3.
Write a function that calculates the circumference of a circle. Your function should take the radius of the circle as an argument and return the circumference using the formula: area = 2 * pi * r. Use 3.14 for pi. Use the following function header:
double circumference(double radius)
Note: You do not need to write the main(), the include, or namespace commands, you only need to write the function.
4.
Write a function with a for loop that counts a specific letter in a string.
x = countLetter(string, char)
Note: You do not need to write the main(), the include, or namespace commands, you only need to write the function.
5.
Write a function that takes a string and three letters to search for and builds a new string from the three letters in the order that they appear in the string. For example, if the inputs are "Boulder, Colorado", "o", "l", "B", the function would return "Bololoo". Use the following function header:
string stringBuilder(string testString, char letter1, char letter2, char letter3)
Note: You do not need to write the main(), the include, or namespace commands, you only need to write the function.
6.
Write a function that calculates the wind chill for a given temperature and a given wind velocity. Your function should take the temperature and wind velocity as inputs and return the wind chill.
You should use this formula:
windchill = 35.74 + 0.6125*temperature + ( 0.4275*temperature-35.74)*pow(wind,0.16)
Use the function header: float windChill(float temp, float windV):
Example: windChill(72,10) would return 72.6706 (do NOT round your answers)
Note: You do not need to write the main(), the include, or namespace commands, you only need to write the function.
These are the question. you can type it into Microsoft word or note too.
Thanks
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- ----------- -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m -----------on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I