Question: Please Help in C++ code Programming Exercise ( 50 poilics). Number of Drinks Write a program that estimates the number of alcoholic drinks (12 ounce

Programming Exercise ( 50 poilics). Number of Drinks Write a program that estimates the number of alcoholic drinks (12 ounce beer, 5 ounce wine, or 1.5 ounces of distilled spirits) you can consume and remain within the legal limit of 0.08 per cent of Blood Alcohol Content (BAC). Your program will prompt the user to enter their weight in pounds and the percentage of alcohol in the beer they are drinking. Ordinary beers contain between 4% and 5% alcohol. (Represent percentage values such as 4% as 0.04, and 5% as 0.05.) Your program will use a function named numbrinks () that receives two arguments: - the user's weight (pounds) - the percentage of alcohol in the beer It will return an estimate of the number of drinks the user can have while remaining under the legal limit of Blood Alcohol Content. The formula you will use is a simplified version of the formula developed by Swedish physician E. M. P. Widmark. drinks =(0.08+0.015) weight /(127.5 alcohol ); Where: drinks = Estimate of the number of drinks. weight = Weight in pounds. alcoho1 = Percentage of alcohol in the beer. The program you write will repeatedly prompt the user to enter their weight and the percentage of alcohol in the beer. Use a while input validation loop to ensure that the value entered for weight is a positive number. Think about what controls your program should place on the values of alcohol percentage to make your program useful. A sentinel value of your choosing will terminate the program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
