Write a Java program that calculates and outputs a baseball pitcher\'s ERA in a
ID: 3529017 • Letter: W
Question
Write a Java program that calculates and outputs a baseball pitcher's ERA in a reasonable report format. ``ERA" is an acronym for ``earned run average" and is computed using the following equation: number of earned runs multiplied by 9 and divided by number of innings pitched Your program must do the following: Prompt the user for the first and last name of the pitcher and store them in two variables of type String Prompt the user for the pitcher's number of earned runs and store it in a variable of type int Prompt the user for the pitcher's number of innings pitched and store it in a variable of type int Compute and output the pitcher's ERA, which should be a floating point number Sample run(s): Pitcher's first name: Zack Pitcher's last name: Greinke Number of earned runs: 73 Number of innings pitched: 171 Zack Greinke has an ERA of 3.8421052631578947 Pitcher's first name: Yovani Pitcher's last name: Gallardo Number of earned runs: 81 Number of innings pitched: 207 Yovani Gallardo has an ERA of 3.5217391304347827Explanation / Answer
difficult to read :(
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.