The tiny tots tee-ball league has 12 players who have jersey numbers 0 through 11. The coach wants a program into which he can type a player’s number and the number of bases the player got in a turn at bat (a number 0 through 4). Write a program that allows the coach to continually enter the values until 999 is entered. Store the statistics in a two dimensional array. At the end of a data entry session, display each player’s number and the number of 0-bases, 1-base, 2-base, and 3-base, and 4-base turns the player had. Display a separate count of the number of data-entry errors the coach makes (a player number greater than 11 or a number of bases greater than 4).
ibr123 0
Newbie Poster
Recommended Answers
Jump to Posttry it out on a paper first u need an if statement to test if 999 is entered you need an array to stare the info and a forlooop to display them... doubt anyone will write your homework code for you
Jump to PostFirst make an int array that has 12 rows (jersies 0-11) and 5 columns (5 bases). See this article how to declare tw-dimensional arrays. Then you need to create two loops, one inside …
All 6 Replies
Captain119 0
Light Poster
Ancient Dragon 5,243
Achieved Level 70 Team Colleague Featured Poster
ibr123 0
Newbie Poster
tinstaafl 1,176
Posting Maven
ibr123 0
Newbie Poster
tinstaafl 1,176
Posting Maven
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.