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

200 words with reference In business, sports, politics, and many

200 words with reference  In business, sports, politics, and many other fields there are probably  countless situations akin to the prisoner’s dilemma where players acting  in their own self-interest do not produce an ideal outcome. Likewise,  some player dynamics also illustrate other game theory concepts like a  game of chicken,

Arizona Corp. had the following account balances at 12/1/19: Receivables:

Arizona Corp. had the following account balances at 12/1/19:  Receivables: $96,000; Inventory: $240,000; Land: $720,000; Building: $600,000; Liabilities: $480,000; Common stock: $120,000; Additional paid-in capital: $120,000; Retained earnings, 12/1/19: $840,000; Revenues: $360,000; and Expenses: $264,000.   Several of Arizona’s accounts have fair values that differ from book value. The fair

Case Study 1: Jamie – Supported Living Agency Jamie is

   Case Study 1: Jamie – Supported Living AgencyJamie is a 35-year-old female with autism and an intellectual disability. She often uses assistive technology on an iPad to communicate with others. Jamie lives in a supported living agency with other adults with disabilities. Her mother is elderly, so Jamie relies

BUSA5090 STRATEGIC MANAGEMENT

Your final project MUST follow this format. Your paper must be 5 – 10 pages not including front matter (cover page, table of contents) and reference pages. All case study assignments must follow APA 6th edition format. Therefore, it must be typed, double spaced, have 1-inch margins, a cover page,

Les Miserables Reflection Paper Watch the movie Les Miseralbles. Choose

   Les Miserables Reflection Paper Watch the movie Les Miseralbles. Choose which version of the movie you would like to view. · 1998: Staring Liam Neeson and Geoffrey Rush – Presented in all talking · 2012: Hugh Jackman and Russel Crow – Presented in almost all singing. Write a paper

Methadone has a more than 30-year history of use in

 Methadone has a more than 30-year history of use in the treatment of opioid addiction. By blocking cravings and withdrawal symptoms without making people high, it reduces illicit drug use. Many individuals on methadone maintenance are able to live successful and productive lives. However, some oppose methadone treatment, arguing that

Consider the venture that you have developed and through research

  Consider the venture that you have developed and through research from sources provided in the course and from academic and scholarly resources outside of the course, evaluate and discuss the following elements: ·  Identify and discuss at least two ethical dilemmas that you as an entrepreneur and your venture

Data Collection, Measurements and Analysis

Data Collection, Measurements and Analysis Academic Level : Bachelor Paper details Instructions: Please find a randomized trial you would like to use for the article critique assignment. Make sure it is from a nursing journal and is not older that five years. Read the “The Three-Minute Appraisal of a Randomized

Overview Bureaucracy often dictates rules and regulations. For example, to

Overview Bureaucracy often dictates rules and regulations. For example, to help consumers compare prices across hospitals and estimate the cost of care, the Centers for Medicare and Medicaid Services (CMS) published rules governing hospital price transparency. Hospitals are required to provide clear, accessible pricing information online about the items and

For this assignment, you are expected to have a formal

 For this assignment, you are expected to have a formal outline of the project handed in for this assignment. The outline should show how all the elements of your Semester Project are sequenced, and what points you’ll make in each section. In the interests of giving you the greatest amount

After learning about the various types of placements for students

After learning about the various types of placements for students with IEPs, you can see there are options. What do you think will be your biggest challenge/struggle when determining placements for your students?  What type of placement(s) do you see yourself teaching? Explain. What type of placement(s) are you least

TOPIC: Reflective Journal Assessment Description. This should be about 2

TOPIC: Reflective Journal Assessment Description. This should be about 2 pages excluding information and references page Learners must maintain a reflective journal integrating self-reflection and inquiry demonstrated in the current Doctor of Nursing Practice (DNP) course. General Requirements: Use the following information to ensure successful completion of the assignment: Download

To what extent may auditors be held liable to compensate

  To what extent may auditors be held liable to compensate those who have suffered financial loss as a result of their negligent advice? D, E and F are partners in DEF and CO, a firm of accountants which acts as the auditor of Fox Ltd. N, a minority shareholder

Purpose A nursing theory provides a framework for evidence based

Premium Paper Help is a professional writing service that provides original papers. Our products include academic papers of varying complexity and other personalized services, along with research materials for assistance purposes only. All the materials from our website should be used with proper references.

We provide premium full grain leather since it adds to

We provide premium full grain leather since it adds to the durability and long life of the garment and is only possible with the best materials and craftsmanship. Consequently, you can choose from a variety of superb leather jackets made of calfskin, goatskin, cowhide, sheepskin and lambskin. Our Website The

What leadership approach is most effective when leading a high

What leadership approach is most effective when leading a high performance team? Discuss the perspective of at least the following leadership styles; Transformational, Servant and Charismatic. Your research paper is limited to 8 pages of text. Research papers must include an abstract no longer than 120 words. All research papers