Develop a program that reads integers

Assignment Help Computer Engineering
Reference no: EM133424058

Question: Solve the following problem using Eclipse:

Develop a program that reads integers, one per line, and displays their sum. Also, display all the numbers read, each with an annotation giving its percentage contribution to the sum. Use a method that takes the entire array as one argument and returns the sum of the numbers in the array. (Hint: Ask the user for the number of integers to be entered, develop an array of that length, and then fill the array with the integers read. A possible dialogue between the program and the user follows:

Here is an example of input and outputInput:

How many numbers will you enter?
4

Enter 4 integers, one per line:
2
1
1
2
Output (Your output must match the following):

The sum is 6.
The numbers are:
2, which is 33.3333% of the sum.
1, which is 16.6666% of the sum.
1, which is 16.6666% of the sum.
2, which is 33.3333% of the sum.

Reference no: EM133424058

Questions Cloud

What are the four requirements of any solution : What are the four requirements of any solution to the critical sections problem? Also explain each.
Prevention program is appropriate : Is utilizing a cost benefit analysis the best method to determine if an evidence based fall prevention program is appropriate (Fall TIPS)?
Describe physical and psychosocial development : Describe the physical and psychosocial development of a child including brain and nervous system, heart, head, chest and lungs, abdomen, neck
Required to use innovator for business analyst : You are required to use Innovator for Business Analyst or any other process modelling software to model both processes ("AS IS" and "TO BE")
Develop a program that reads integers : Develop a program that reads integers, one per line, and displays their sum. Also, display all the numbers read, each with an annotation giving its percentage
Why are these important to you and the scholarly community : What are your three most important personal and professional priorities regarding the completion of your dissertation research and life beyond graduation?
How does programming and computer science relate : How does programming and computer science relate to the informatics major? What would be a problem that you would incur in informatics that could be fixed
What is your view on this matter : Any agreement in restraint of trade or profession is void. What is your view on this matter? Law of Agency, Contract Act 1950 It is common for sellers to put up
What role does gender play in your motivations : What motivates you? Why are you in college? Are you here in order to make more money one day or do you just want to enrich yourself

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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