Question: PLEASE READ. I NEED TO CREATE C++ FUNCTIONS. THOSE FUNCTIONS WILL BE USED TO CREATE A COMPLETE C++ PROGRAM. BELOW ARE THE FUNCTIONS I NEED
PLEASE READ. I NEED TO CREATE C++ FUNCTIONS. THOSE FUNCTIONS WILL BE USED TO CREATE A COMPLETE
C++ PROGRAM. BELOW ARE THE FUNCTIONS I NEED AND THE INSTRUCTIONS TO COMPLETE THE PROGRAM.






2) Write a function that calculates and returns the level of alcohol concentration in the blood for a person who has been drinking (BAC). There are several ways to calculate this value, but in this exercise the following formula will be used: BAC= 0.0 15. t+ 0.0165 where: A-alcohol consumed (in grams) w = body mass (in hect grams) ttime since the first drink (in hours) r-constant that represents the fraction of the body mass in which alcohol could be present: 0.68 for men, 0.55 for women Note that the variable r is different for men and for women, so you need an if that asks if the sex of the person is 'F' (female) or 'N' (male) to assign the value to the variable r that will be lused in the formula: 0.55 or 0.68, respectively This function has the purpose of calculating the BAC only, so the values of A, w, t and the sex of the person who has been drinking (F' or 'N') need to be provided. The variable sex is char Note: Only the function that does what is described here is requested, not the complete program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
