Create a function that returns an Earned Run Average (ERA). An ERA is calculated by multiplying 9 by the quotient of Earned Runs Allowed er divided by ip Innings Pitched. In baseball statistics, innings are represented with a fractional part of .1 (1/3) or .2 (2/3) to represent the number of outs in an inning. A whole number or a number with a fractional part of .0 represents a full inning with three outs. Check the Resources tab for a deeper explanation. Examples era (22, 99)→ 2.00 era (23, 99.1) 2.08 era (24, 99.2) →2.17 →

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.2: Returning A Single Value
Problem 14E
icon
Related questions
Question
100%
Create a function that returns an Earned Run Average (ERA). An
ERA is calculated by multiplying 9 by the quotient of Earned
Runs Allowed er divided by ip Innings Pitched.
In baseball statistics, innings are represented with a fractional
part of .1 (1/3) or .2 (2/3) to represent the number of outs in an
inning. A whole number or a number with a fractional part of .0
represents a full inning with three outs. Check the Resources
tab for a deeper explanation.
Examples
era (22, 99) → 2.00
era (23, 99.1) → 2.08
era (24, 99.2) 2.17
Transcribed Image Text:Create a function that returns an Earned Run Average (ERA). An ERA is calculated by multiplying 9 by the quotient of Earned Runs Allowed er divided by ip Innings Pitched. In baseball statistics, innings are represented with a fractional part of .1 (1/3) or .2 (2/3) to represent the number of outs in an inning. A whole number or a number with a fractional part of .0 represents a full inning with three outs. Check the Resources tab for a deeper explanation. Examples era (22, 99) → 2.00 era (23, 99.1) → 2.08 era (24, 99.2) 2.17
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Returning value from Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr