answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
artcher [175]
2 years ago
4

1))a loop that reads positive integers from standard input, printing out those values that are greater than 100, and that termin

ates when it reads an integer that is not positive. The values should be separated by single blank spaces.2))a loop that reads positive integers from standard input, printing out those values that are even, separating them with spaces, and that terminates when it reads an integer that is not positive.3))Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive. After the loop terminates , it prints out the sum of all the even integers read.4))Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value is considered a CONSECUTIVE DUPLICATE. In this example, there are three such consecutive duplicates: the 2nd and 3rd 5s and the second 6. Note that the last 3 is not a consecutive duplicate because it was preceded by a 7.
Computers and Technology
1 answer:
CaHeK987 [17]2 years ago
5 0
For the answer to the question above asking to write <span>a loop that reads positive integers from standard input, printing out those values that are greater than 100, and that terminates when it reads an integer that is not positive. The values should be separated by single blank spaces.2))a loop that reads positive integers from standard input, printing out those values that are even, separating them with spaces, and that terminates when it reads an integer that is not positive.

</span>//use java not javascript
Scanner scan = new Scanner(s); 
int nums[] = new int[2000]; 
int value =1; 
int index = 0; 
\\loop for entering values and save those over 100 in an array 
While( value >= 0 ) \\ as long input is positive number loop continues 
{ 

System.out.print("Enter an integer : "); 
value = scan.nextInt( ); 
if(value > 100) 
{ 
nums[index] = value; 
index++; 
} 

} 

//Next loop prints the array contents on one line with one space 
for( int i =0; i < nums.length; i++) 
{ 
if(nums[i] > 100) 
<span>System.out.print(n
</span>
I hope this helps
You might be interested in
You are using a polynomial time 2-approximation algorithm to find a tour t for the metric traveling salesman problem. Which of t
Svet_ta [14]

Answer:

B. The cost of tour t is at most twice the cost of the optimal tour.

Explanation:

You are using a polynomial time 2-approximation algorithm to find a tour t for the traveling salesman problem.

The cost of tour t is at most twice the cost of the optimal tour

The equation represented as Cost(t) <= 2 Cost(T)

Where

Cost (t) represents cost of tour t

Cost(T) represents cost of the optimal tour

3 0
2 years ago
If you’d like to have multiple italicized words in your document, how would you change the font of each of these words?
Mariana [72]
You select the words and then format - italics
5 0
2 years ago
Read 2 more answers
Which statements describe the Sort List feature of Word? Check all that apply.
natulia [17]

Answer: It arranges text in a list alphabetically from A to Z.

Explanation: It's always easier and more systematic to arrange alphabetically. With numbers there is the possibility of infinity but not with alphabet which have a defined range.

7 0
2 years ago
Read 2 more answers
What is retrieved from a search containing two terms separated<br> by the AND operator?
egoroff_w [7]

Answer:

A AND B= 1 or 0

1 1  1

0 1  0

1 0  0

0 0 0

So, as explained above if both are 1 we then only get 1, or else we get 0 always in case of AND which is a logical operator, whose output can be 0 or 1 only. This is being depicted above.

Explanation:

If both are 1 we get 1 or always else, we get the output =0.

8 0
2 years ago
George is working with an image in Photoshop. He added a lot of effects to the image. He saved the first draft of the file. The
Alja [10]

Answer:

JPEG, PDF

Explanation:

3 0
2 years ago
Read 2 more answers
Other questions:
  • In what year were graphical user interfaces (GUIs) pioneered? 1969 1974 1991 2001
    12·2 answers
  • Programming challenge description: Write a program that, given two binary numbers represented as strings, prints their sum in bi
    6·1 answer
  • You are on vacation and want to see where all the restaurants and trendy shops are in relation to your hotel. You remember there
    15·1 answer
  • Convert to octal. Convert to hexadecimal. Then convert both of your answers todecimal, and verify that they are the same.(a) 111
    12·1 answer
  • Dillard’s wants to learn about its consumers' attitudes toward online purchases. There are numerous studies that are available a
    9·1 answer
  • _____ is a markup language designed to transport and store data on the Web. Group of answer choices Standard Generalized Markup
    13·1 answer
  • Of these two types of programs:a. I/O -bound b. CPU -bound which is more likely to have voluntary context switches, and which is
    6·1 answer
  • (a) Show how to use (the Boolean formula satisfiability program) satisfiable num (and substitute) to find a satisfying assignmen
    9·1 answer
  • Which of these are characteristics of a Python data type? Check all that apply.
    11·1 answer
  • In an executing process, the program counter points __________.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!