subject

Assignment #2 will be the construction of a program that reads in an unspecified number of integers from standard input, performs some calculations on the inputted numbers, and outputs the results of those calculations to standard output. The numbers could be delimited by any kind of whitespace, i. e. tabs, spaces, and lines (Note that if you use the Scanner class, you do not have to worry about these delimiters. They will be taken care of by the Scanner). Your program will continue to read in numbers until the number 0 is entered. At this point, the calculations will be outputted in the following format: The minimum integer is 0 The sum of the positive integers is 0 The sum of the even integers is 0 The number of negative integers in the sequence is 0 This means that your program reads all numbers (including the last number 0), you need to compute the minimum, the sum of positive integers (integers that are greater than 0), the sum of even integers (integers that can be divided by 2, you can use "number%2 == 0"), and count how many negative integers (integers that are less than 0) in the sequence. Note that the above is an output for the first test case. For other test cases, you will have different numbers. Do not output a prompt to query for the numbers. The number 0 is included in the sequence of integers and should be included in all of your calculations.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 14:30, SKYBLUE1015
What percentage of companies is projected to use social media to locate new employees in 2012
Answers: 2
image
Computers and Technology, 22.06.2019 15:00, yeet74
I'm taking a class on how to make a movie, and it offers some apps that would be in the process. the thing is, i don't have any of those ha. if you have any tips on some apps i could use, that would be awesome. i don't have an iphone, so don't suggest any apps like imovie. i know that this is a weird question, but it would be super for me. : )
Answers: 2
image
Computers and Technology, 23.06.2019 07:00, sugaree95
What are three software programs for mobile computing?
Answers: 1
image
Computers and Technology, 23.06.2019 14:30, HarryPotter10
Open this link after reading about ana's situation. complete each sentence using the drop-downs. ana would need a minimum of ato work as a translator. according to job outlook information, the number of jobs for translators willin the future.
Answers: 3
You know the right answer?
Assignment #2 will be the construction of a program that reads in an unspecified number of integers...

Questions in other subjects:

Konu
Mathematics, 22.07.2019 22:40
Konu
Spanish, 22.07.2019 22:40