Question: Create an array and calculate the numbers as described

 

Question: 

Create an array and calculate the numbers as described below.

1) Create an array varibale with size 5
2) Ask user to input elements/values for the array variable
3) Ask user to input a integer number to multiply with array elements that created above. 
4) Pass the array and integer number to a function below (This function should return an integer value)

int calculate(int[], int).

5) Multiply the array elements with that integer number and store the results into new array 
6) Calculate the average value on the new array elements that created in Step-5 and find how many numbers are above average
7) And return this number to main method and display the results. 

Sample Output-1:
Enter 5 numbers to create array elements : 
8
4
5
6
2
Enter the number to multiply with Array elements : 7
Multiplication Results : [56, 28, 35, 42, 14]
Average value is 35.0
2 numbers are above average

Sample Output-2:
Enter 5 numbers to create array elements : 
8
9
4
5
8
Enter the number to multiply with Array elements : 5
Multiplication Results : [40, 45, 20, 25, 40]
Average value is 34.0
3 numbers are above average

Hint: 

You need to use single dimensional array and methods to achieve this task. 

Submission Requirement:

Please you need to submit your work in word format, and  each question should provide the below requirements:

  • The code 
  • The results in screenshots (including minumum 3 test results) 

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

You have just been promoted to a management position at

You have just been promoted to a management position at a multinational company. Most of the leaders of the company are from the baby-boomer generation, which is known for closely adhering to a hierarchical, top-down leadership model. They have been with the company for an average of 18 years. You

A CLASSIC CASE FROM MY ORGANIZATION: IDENTIFY THE PRINCIPAL, SECONDARY,

    A CLASSIC CASE FROM MY ORGANIZATION: IDENTIFY THE PRINCIPAL, SECONDARY, PRE-EXISTING DIAGNOSIS AS WELL AS ANY COMPLICTION  USE YOUR ICD-10 BOOKS ONLY! Jane Doe was admitted with severe rectal bleeding. Jane complain that she was having the bleeding for several months. MD took her his history and note that

SU Health Insurance and The Affordable Care Act Essay Nursing Assignment Help

Health Insurance and the Affordable Care Act Suppose you have been tasked with purchasing health insurance for your organization that has fifty full-time employees. Use the Internet or  databases to research different types of health insurance. Write apaper in which you: Suggest one  (1) plan that you would use to

For this week’s discussion, use the Internet or Company Dossier

  For this week’s discussion, use the Internet or Company Dossier through Nexis Uni to research one publicly-traded company you are interested in. Review its most recent statement of cash flows. Be prepared to discuss. Review the company’s operating, investing, and financing activities. Suggest at least two items from each

Your job in this assignment is to convey a sustainability

 Your job in this assignment is to convey a sustainability concept to the business world effectively as a marketing firm. Then you will take a sustainable business concept and communicate it in a way that touches environmental and social stakeholders. Remember that each party has a different way of viewing

Discuss the social problem of women and inequality

The paper must be written in Times New Roman size 12. The paper has to be written in APA format. The paper has to be double-spaced. The paper must discuss the social problem of women and inequality and how they are getting paid less money than men are. You have

Question 1: What is the general relationship between U.S. law

Question 1: What is the general relationship between U.S. law and international law? That is, how does international law impact or affect U.S. law, particularly in the National Security context, and how is international law incorporated into United States law? What should the relationship be? What Biblical principles apply when

Regulation for Nursing Practice Staff Development Meeting

 Assume that you are leading a staff development meeting on regulation for nursing practice at your healthcare organization or agency. Review the NCSBN and ANA websites to prepare for your presentation. The Assignment: (9- to 10-slide PowerPoint presentation) Develop a 9- to 10-slide Voice-Over PowerPoint Presentation that addresses the following: 

Only peer-reviewed publications published within the last 5 years can

 Only peer-reviewed publications published within the last 5 years can be used. Use your online library.  No Wikipedia, BLOGS with Ads from Yahoo, UKEssay.com; Buzzle.com, or sites that change as they present a biased opinion.  Google Scholar is accepted. Use of the Keiser University Writing Studio is encouraged, but not

Question 1: The incidence of diabetes has reached epic proportions

Question 1: The incidence of diabetes has reached epic proportions in the U.S.  What are the health-related risks associated with poorly controlled diabetes?  Do you have a family member or close friends diagnosed with either type 1 or type 2 diabetes?   In your opinion, are they in compliance with

Digital Archival Digital preservation can be defined as the long-term,

 Digital Archival Digital preservation can be defined as the long-term, error-free storage of digital information, with means for retrieval and interpretation, for the entire time span the information is required to be retained.  However, business organizations continue to face significant challenges in meeting their LTDP needs, especially those organizations whose

Please provide a 200 word minimum response to the below

 Please provide a 200 word minimum response to the below question. The text book for the class is:  Caldero, Michael, and Crank, John, Police Ethics: The Corruption of the Noble Cause, (2018),Anderson Publishing, ISBN: 978-1437744559. The 4th Edition is listed in Amazon, ISBN-13: 978-1138061170, ISBN-10: 1138061174  Question: How do the

Fresh Dog Treats is a newly developed company that is

Fresh Dog Treats is a newly developed company that is focusing on catering to the premium pet market.  Specifically, the company is creating gourmet/organic grain-free fresh dog treats.  While these treats are similar to some treats offered on the market currently by such companies as FreshPet, one of the biggest

Menu 1: Schleicher County Nursing Home​ Menu 2: Sharon Village

Menu 1: Schleicher County Nursing Home​ Menu 2: Sharon Village Care Homes​ Comparing the two menus- here is the questions that needs to be answered below.  1. Compare each original sample menu with its corresponding replacement menu.​  2. Explain why the team’s menus are better nutritional options for your two

Instructions: Explain how and why slavery developed in the American

Instructions:   Explain how and why slavery developed in the American colonies. Describe in what ways the practice of slavery was different between each colonial region in British North America. Analyze the differences between slaves and indentured servants.   Length: 1-2 pages (not including title page or references page) 1-inch

The U.S. Constitution Article I, Section IX mandates “a regular

 The U.S. Constitution Article I, Section IX mandates “a regular statement and account of the receipts and expenditures of all public money shall be published from time to time” by the federal government.Two centuries after the publication of the U.S. Constitution, it is still difficult for the federal government to