Write a program that takes two ints as input from keyboard


Problem:

Question 1- Write a program that takes two ints as input from the keyboard, representing the number of hits and the number of at-bats for a batter. Then calculate the batter's hitting percentage and check if the hitting percentage is above .300. If it is, output that the player is eligible for the All Stars Game; otherwise, output that the player is not eligible.

Question 2- Write an application that prompts the user to input integer values that you sum. The user will provide a sentinel value to signal the end of data to input. Use a while loop to prompt the user. Remember to use a prompting read and to reprompt for values in the while loop. Print out the total value after the user enters the sentinel.

Please describe the code with the help of comments.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program that takes two ints as input from keyboard
Reference No:- TGS0893416

Expected delivery within 24 Hours