Question: C++ Programming Windows Console Application A C++ program is needed that uses the number of wins and losses a baseball team acquired during a complete
C++ Programming Windows Console Application


A C++ program is needed that uses the number of wins and losses a baseball team acquired during a complete season to calculate their percentage of wins. The program should be organized as a main function and three value-returning functions. The first is a parameter-less function that inputs the number of wins and returns this number to the main function. The second is a similar function that does the same thing for the losses. The third function should be passed the wins and looses, which it will use to calculate and return the percentage of wins (number of wins/total games) to the main function. Main should print the result to two decimal places. Don't forget prototypes Print the code to be turned into the instructor. NOTE: wins and losses are integer values while percentage is a float. Remember you cannot divide integer by integer and get a float. You will have to convert one of the values to float. The return statement of the third (value turning function) should look something like this return float win/sum); where win is a parameter passed to the function and sum is the addition of win and losses losses also passed to the function). Also note that the percentage output should be in percent to two decimal places example: 66-67%) and not just decimal -6667
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
