Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91605035
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Question we are running the insertion sort algorithm on the

Question : We are running the Insertion Sort algorithm on the array A = . a) Write the array A at the start of the iteration j=5 of the for loop. b) What is the value of i at the start of the iteration j=6 of the for loo ...

How could legislation impact on operations within your

How could legislation impact on operations within your organisation in relation to innovation, project management, and operational planning? Briefly outline any relevant requirements (e.g. intellectual property, WHS).

String problemfor each numerical value 0 1 2 9 0 lt number

String Problem For each numerical value 0, 1, 2, ...9 (0 Print the converted sentence both to the screen and to an output file. Your input file consists of a variable number of records. Each record is a sentence of lengt ...

Search the internet for information regarding the

Search the Internet for information regarding the interaction between web browser and web server using HTTPS from initial handshake to close of the session. Create a detailed drawing of the steps and also annotate each s ...

Analyse two of the three technologies provided focus

Analyse two of the three technologies provided (focus virtualisation, cloud computing and green computing). Summarise what each of your two selected technologies is, and what the technology does. Explain what improvement ...

Please discuss the data hazards associated with pipelining

Please discuss the data hazards associated with pipelining with an example and how these hazards impact the performance gain associated with pipelining.

A weight loss program claims that program participants have

A weight loss program claims that program participants have a mean weight loss of at least 12 pounds after 1 month. You work for a medical association and are asked to test this claim. A random sample of 30 program parti ...

Recursive greatest common divisor the greatest common

(Recursive Greatest Common Divisor) The greatest common divisor of integers x and y is the largest integer that evenly divides both x and y. What is a recursive function gcd that returns the greatest common divisor of x ...

Consider the following production function that is already

Consider the following production function that is already written in per worker terms: y = Akαh 1-α where h represents human capital per worker. Suppose we are given the following information: capital per worker in an e ...

Cwrite function that takes an array of doubles and the

C++ Write function that takes an array of doubles and the array length as parameters (compute the array length using size of, don't just put in the number 5). In the function, find and return the largest value. Write sec ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As