subject

Ask the user to enter as many ints as they want, and tell them to type “done” when they are done entering the numbers. Store these numbers in a data structure. (Think carefully about which one to use.) Write a method that computes the sum of all the elements in the data structure. Write a method that finds the smallest positive number in the data structure (return 9999 if there aren’t any positive numbers). Call these methods on the data structure with the user’s numbers.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
The word ‘play’ comes with many different interpretations and a variety of definitions. discuss some of the various meanings tied to the word play. why is the concept of play thought to be an important addition to the workplace? do some (brief) research online and give an example of how play in the workplace is being done right.
Answers: 2
question
Computers and Technology, 22.06.2019 05:20
Write a program called assignment3 (saved in a file assignment3.java) that computes the greatest common divisor of two given integers. one of the oldest numerical algorithms was described by the greek mathematician, euclid, in 300 b.c. it is a simple but very e↵ective algorithm that computes the greatest common divisor of two given integers. for instance, given integers 24 and 18, the greatest common divisor is 6, because 6 is the largest integer that divides evenly into both 24 and 18. we will denote the greatest common divisor of x and y as gcd(x, y). the algorithm is based on the clever idea that the gcd(x, y) = gcd(x ! y, y) if x > = y and gcd(x, y) = gcd(x, y ! x) if x < y. the algorithm consists of a series of steps (loop iterations) where the “larger” integer is replaced by the di↵erence of the larger and smaller integer. this continues until the two values are equal. that is then the gcd.
Answers: 3
question
Computers and Technology, 22.06.2019 06:00
The width of a piece of rectangular land is 5m shorter rhan 1/3 of its length .find the width of the land if the length is 60m,150m.
Answers: 1
question
Computers and Technology, 23.06.2019 15:10
What role did women fill during world war ii?
Answers: 1
You know the right answer?
Ask the user to enter as many ints as they want, and tell them to type “done” when they are done ent...
Questions
question
Business, 18.10.2019 08:30
question
Mathematics, 18.10.2019 08:30
question
Mathematics, 18.10.2019 08:30
question
Mathematics, 18.10.2019 08:30
question
English, 18.10.2019 08:30
Questions on the website: 13722363