Uses parallel arrays to determine the batting average

Assignment Help Basic Computer Science
Reference no: EM13341143

Write a program that uses parallel arrays to determine the batting average and slugging percentage for a baseball team by position. there are nine positions on a baseball team and your program should have parallel arrays with and upper bound of 9. your program will read data in pairs; the first number will be between 1 and 9 and will represent the batter's position, and the second number will be either a 0 (for and out ) or a 1 (for a single) or a 2 (for a double) or a 3 (for triple) or a 4(for a home run). the program will continue to input data pairs until the sentinel value -1 is read. at that point, the program should output the batting average and slugging percentage for each of the nine positions. (note: batting average is the number of hits divided by the number of at bats and slugging percentage is the total number of bases divided by the number of at bats. you might want to have three parallel arrays in your solution.) hints: you will probably need parallel arrays for hits, bats, and bases.

Reference no: EM13341143

Questions Cloud

View at least two of the following feature films : View at least two of the following feature films and respond to them (with at least a substantive paragraph or two, 100+ word minimum) in the Film Diary Discussion Forum
An annotated bibliography reflects an exhaustive : An annotated bibliography is a research tool that will help you to keep track of the sources you encounter while working on larger research projects. Generally, an annotated bibliography reflects an exhaustive search of a topic; for this class,..
Analyzing a published work : Analyzing a Published Work
Most important to the success of a presentation : What do you think is most important to the success of a presentation: good content, or form or delivery?
Uses parallel arrays to determine the batting average : Write a program that uses parallel arrays to determine the batting average and slugging percentage for a baseball team by position.
What is a security risk assessment : What is a Security Risk Assessment?
Spam is email still a useful information service : Given all the problems with spam is email still a useful information service? Research other networked services available on Linux servers and compare them with email. (500 words)
Use a triangle to indicate the challenges and bus processes : Use a triangle to indicate the challenges and bus processes changes
Necessarily memorize to the best of the machine abilities : If a researcher uses computer models for studying the memorization capabilities of the human mind, do the programs developed for the machine necessarily memorize to the best of the machine's abilities? Explain.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Should ibm bet its business on that assumption

Do you agree with IBM researchers' assumption that IT will remain "hard to use, expensive, and labor-intensive, with customers continuing to need help solving business problems" for along time to come?

  Illustrate and draw the transformation for each case

Illustrate and draw the transformation for each case.

  Which operation following expression will be performed first

Which operation in the following expression will be performed first? c = a++ / b + 5;

  Organisational changes to implement the long-term plan

What organisational changes are necessary in order to implement the long-term plan derived in question number two above?

  Convert the logical design to a physical design

An art dealer wants you to design a database. He will sell one art item to a customer in a single deal. Design a database: List Entities, present logical design, and convert the logical design to a physical design.

  Describe the major components of a datawarehouse

Briefly describe the major components of a datawarehouse architecture. Explain how the volatility of a datawarehouse is different from the volatility of a database for an operational information system. Please cite sources if any used.

  How it''s data can associated with specific row of main form

If the Subform control is used how it's data can associated with specific row of the main form

  Write an algorithm to compute a student average grade

Weight is 20, maximum score is 75 iii. Final exam - Weight is 30, maximum score is 100 As an example, if a student scores 100 on the Homework Assignments, 55 on the Midterm exam and 85 on the Final exam, then their average grade is rounded to 82.

  Examine the current content management

Examine the current content management, determine the strengths and weaknesses, and define improvements.

  Is it beneficial to give young children with computers

After reading information under heading Statuses, explain and provide the example of each of the following as each applies to you and your life.

  Corporate goal for scr new training activity

We require corporate goal for SCR which refers to new training activity. Create a draft to show Jesse. Draft project scope statement for TIMS system

  Write program calculates and prints the average several int

Write a program that calculates and prints the average of several integers. Assume the last value read with scanf is the sentinel 9999

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd