Question: Write the C++ code that will complete the following tasks. The runs, innings, and earn_avg variables have been properly declared. Make sure to declare any
Write the C++ code that will complete the following tasks. The runs, innings, and earn_avg variables have been properly declared. Make sure to declare any other variables that you use when writing the answer.
- Store 65 in an integer variable named runs
- Store 150 in an integer variable named innings
- Calculate an earned run average by dividing runs by innings and multiplying by 9. Store the calculated earned run average in a double variable named earn_avg .
Step by Step Solution
There are 3 Steps involved in it
Heres the C code to accomplish the tasks described cpp code include iostream int main Declar... View full answer
Get step-by-step solutions from verified subject matter experts
