In cold weather, meteorologists report an index called the wind chill factor, which takes into account the wind speed and the temperature. The index provides a measure of the chilling effect of wind at a given air temperature. Wind chill may be approximated by the following formula:
v = wind speed in m/sec
t = temperature in degrees Celsius:
W = wind chill index (in degrees Celsius)
Write a function that returns the wind chill index. Your code should ensure that the restriction on the temperature is not violated. Look up some weather reports in back issues of a newspaper or from a weather website and compare the wind chill index you calculate with the result reported or website.
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Absolute C++
Additional Engineering Textbook Solutions
Elementary Surveying: An Introduction To Geomatics (15th Edition)
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
SURVEY OF OPERATING SYSTEMS
Management Information Systems: Managing The Digital Firm (16th Edition)
Starting Out With Visual Basic (8th Edition)
Problem Solving with C++ (10th Edition)
- Context: Measuring Air Quality Levels of various air borne pollutants such as Nitrogen Monoxide (NO), Nitrogen Dioxide (NO2) and particulate matter (also called particle pollution) are all major contributors to the measure of overall air quality. For instance, NO2 is measured using micrograms in each cubic metre of air (㎍/m3). A microgram (㎍) is one millionth of a gram. A concentration of 1 ㎍/m3 means that one cubic metre of air contains one microgram of pollutant. To protect our health, the UK Government sets two air quality objectives for NO2 in their Air Quality Strategy The hourly objective, which is the concentration of NO2 in the air, averaged over a period of one hour. The annual objective, which is the concentration of NO2 in the air, averaged over a period of a year. The following table shows the colour encoding and the levels for Objective 1 above, the mean hourly ratio, adopted in the UK. Index 1 2 3 4 5 6 7 8 9 10 Band Low Low Low Moderate Moderate Moderate High…arrow_forwardStock Return Performance Analysis: An investment firm monitors the daily returns of a particular stock in the S&P 500. The daily return is defined as the percentage change in the stock's price from the previous day. The firm recorded the stock's daily returns at random times during the last quarter of the year. Assume that the standard deviation of the population of daily returns is known to be σ = 2.8%. The data for daily return for the particular stock in the S&P 500 is given in Excel under “DAILY RETURN” sheet. a) Based on a 95% confidence level, what is the margin of error for the mean estimate of the daily return? b) Given the margin of error computed in part (b), provide a 95% confidence interval for μ, the mean daily return for this stock. The stock’s long-term average daily return is stated as 1.5%. Are the results of this analysis consistent with the stock’s long-term performance?arrow_forwardStock Return Performance Analysis: An investment firm monitors the daily returns of a particular stock in the S&P 500. The daily return is defined as the percentage change in the stock's price from the previous day. The firm recorded the stock's daily returns at random times during the last quarter of the year. Assume that the standard deviation of the population of daily returns is known to be σ = 2.8%. The data for daily return for the particular stock in the S&P 500 is given in Excel under “DAILY RETURN” sheet. a) Given the margin of error computed in part (b), provide a 95% confidence interval for μ, the mean daily return for this stock. The stock’s long-term average daily return is stated as 1.5%. Are the results of this analysis consistent with the stock’s long-term performance?arrow_forward
- Stock Return Performance Analysis: An investment firm monitors the daily returns of a particular stock in the S&P 500. The daily return is defined as the percentage change in the stock's price from the previous day. The firm recorded the stock's daily returns at random times during the last quarter of the year. Assume that the standard deviation of the population of daily returns is known to be σ = 2.8%. The data for daily return for the particular stock in the S&P 500 is given in Excel under “DAILY RETURN” sheet. a) Based on a 95% confidence level, what is the margin of error for the mean estimate of the daily return?arrow_forwardStock Return Performance Analysis: An investment firm monitors the daily returns of a particular stock in the S&P 500. The daily return is defined as the percentage change in the stock's price from the previous day. The firm recorded the stock's daily returns at random times during the last quarter of the year. Assume that the standard deviation of the population of daily returns is known to be σ = 2.8%. The data for daily return for the particular stock in the S&P 500 is given in Excel under “DAILY RETURN” sheet. a) Find the mean and the standard deviation of 20 random samples of daily returns.?arrow_forwardStock Return Performance Analysis: An investment firm monitors the daily returns of a particular stock in the S&P 500. The daily return is defined as the percentage change in the stock's price from the previous day. The firm recorded the stock's daily returns at random times during the last quarter of the year. Assume that the standard deviation of the population of daily returns is known to be σ = 2.8%. The data for daily return for the particular stock in the S&P 500 is given in Excel under “DAILY RETURN” sheet. a) Find the mean and the standard deviation of 20 random samples of daily returns.? b) Based on a 95% confidence level, what is the margin of error for the mean estimate of the daily return? c) Given the margin of error computed in part (b), provide a 95% confidence interval for μ, the mean daily return for this stock. The stock’s long-term average daily return is stated as 1.5%. Are the results of this analysis consistent with the stock’s long-term…arrow_forward
- (Transportation) Road construction requires estimating the expected loads on a road’s pavement over its design life. A common approach for determining this information is to use ESAL values; one ESAL is the load a single 18,000-lb (80,000 N) single-axle truck applies to the road’s surface. The ESAL value for any single-axle vehicle can be approximated by this formula: ESAL=[W18,000]4 ESAL is the equivalent single-axle load. W is the vehicle’s weight (lbs). Using this formula, write, compile, and run a C++ program that determines ESAL values and use it to complete the following chart. The ESAL values should be output in a field width of 10, with six digits after the decimal point.arrow_forwardWhen you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first months interest on $1,000 is 1000 0.006 = 6. Because the payment is $25 and the interest for the first month is $6, the payment toward the principal amount is 25 6 = 19. This means after making the first payment, the loan amount is 1,000 19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 0.006 = 5.886, that is, approximately $5.89. This implies that the payment toward the principal is 25 5.89 = 19.11 and the remaining balance after the second payment is 981 19.11 = 961.89. This process is repeated until the loan is paid. Write a program that accepts as input the loan amount, the interest rate per year, and the monthly payment. (Enter the interest rate as a percentage. For example, if the interest rate is 7.2% per year, then enter 7.2.) The program then outputs the number of months it would take to repay the loan. (Note that if the monthly payment is less than the first months interest, then after each payment, the loan amount will increase. In this case, the program must warn the borrower that the monthly payment is too low, and with this monthly payment, the loan amount could not be repaid.)arrow_forward(Mechanics) The deflection at any point along the centerline of a cantilevered beam, such as the one used for a balcony (see Figure 5.15), when a load is distributed evenly along the beam is given by this formula: d=wx224EI(x2+6l24lx) d is the deflection at location x (ft). xisthedistancefromthesecuredend( ft).wistheweightplacedattheendofthebeam( lbs/ft).listhebeamlength( ft). Eisthemodulesofelasticity( lbs/f t 2 ).Iisthesecondmomentofinertia( f t 4 ). For the beam shown in Figure 5.15, the second moment of inertia is determined as follows: l=bh312 b is the beam’s base. h is the beam’s height. Using these formulas, write, compile, and run a C++ program that determines and displays a table of the deflection for a cantilevered pine beam at half-foot increments along its length, using the following data: w=200lbs/ftl=3ftE=187.2106lb/ft2b=.2fth=.3ftarrow_forward
- (Heat transfer) The formula developed in Exercise 5 can be used to determine the cooling time, t, caused only by radiation, of each planet in the solar system. For convenience, this formula is repeated here (see Exercise 5 for a definition of each symbol): t=Nk2eAT3fin A=surfaceareaofasphere=4r2 N=numberofatoms=volumeofthespherevolumeofanatom Volume of a sphere sphere=43radius3 The volume of a single atom is approximately 11029m3 . Using this information and the current temperatures and radii listed in the following chart, determine the time it took each planet to cool to its current temperature, caused only by radiation.arrow_forwardOne way to determine how healthy a person is by measuring the body fat of the person. The formulas to determine the body fat for female and male are as follows: Body fat formula for women: A1 = (body weight x 0.732) + 8.987 A2 = wrist measurement (at fullest point)/3.140 A3 = waist measurement (at navel) x 0.157 A4 = hip measurement (at fullest point) x 0.249 A6 = forearm measurement (at fullest point) x 0.434 B = A1 + A2 A3 A4 + A5 Body fat = body weight - B Body fat percentage = body fat x 100/body weight Body fat formula for men: A1 = (Body weight x 1.082) + 94.42 A2 = wrist measurement x 4.15 B = A1 A2 Body fat = body weight B Body fat percentage = body fat x 100/body weight Write a program to calculate the body fat of a person.arrow_forward(Civil eng.) Write an assignment statement to determine the maximum bending moment, M, of a beam, given this formula: M=XW(LX)L X is the distance from the end of the beam that a weight, W, is placed. L is the length of the beam.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrOperations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks ColeC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT