Write a program in which you create an array of size twelve

Assignment Help Data Structure & Algorithms
Reference no: EM13934145

A football team plays a football game almost every month. It stores the number of goals scored per month in an array of size 12. The number of goals scored on January is stored in the first element of the array (at index 0). The number of goals scored on February is stored in the 2nd element of the array (at index 1) and so on.

a. The team wants to find the month in which they scored the maximum number of goals. Write a function named String Max(int[] A) that takes the array of goals and returns the month name (a string value) in which they scored the maximum number of goals.

b. The team wants to find the number of games played during the year. Note that if the team didn't play a game in a specific month, the value -1 is found. Write a function int NbGames(int[] A) to count the number of games played during the year.

c. Write a program in which you create an array of size 12 having all its elements initialized to -1. Then ask the user to enter a month number and the number of goals scored in that month. Your program keeps reading information till the user decides to stop.

Sample Run: Enter the month number: 3 Enter the scores: 2 Enter 'y' to continue or 'n' to stop: y Enter the month number: 2 Enter the scores: 1 Enter 'y' to continue or 'n' to stop: y Enter the month number: 0 Enter the scores: 4 Enter 'y' to continue or 'n' to stop: n Your team played 3 game(s) Your team scored maximum goals on January

Reference no: EM13934145

Questions Cloud

Method of cleansing and sterilization : Explain the reasons for an effective infection control policy and discuss whether the current method of cleansing and sterilization should be favored over the use of disposable instruments.
Why should people have less of appetite for sweets : Why should people have less of an appetite for sweets when they are stressed? Assistances supporting a possible explanation for this phenomenon, as well as gender differences in taste sensitivity, are explored.
Keeping accurate confidential patient records : The leakage of such sensitive information of the patient may even damage the status and reputation of the medical institution and the involved medical professionals.
How story of standard oil illustrate limit of business power : How does the story of Standard Oil illustrate the limits of business power? Does it better illustrate the dominance theory or the pluralist theory discussed in the chapter
Write a program in which you create an array of size twelve : Write a program in which you create an array of size 12 having all its elements initialized to -1. Then ask the user to enter a month number and the number of goals scored in that month.
Should you report him to your boss : What is your obligation here? Should you report him to your boss?
Discuss various approaches to stress management organization : Discuss the various approaches to stress management an organization might institute and evaluate their merit.
Protocols and their performance evaluation methodologies : "Wireless Sensor Networks: A survey of cross-layer MAC and Routing protocols and their performance evaluation methodologies" It is a literature review topicRegardless of the topic chosen, you need to demonstrate a sound knowledge and understanding..
Describe the participants involved : describe the participants involved Who were they? Where were they? Were they depressed persons from Canada?  (2) Describe the research method used; did they use an inventory, did they observe the participants etc.  (3) Lastly, summarize the results.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

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