1answer.
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
san4es73 [151]
3 years ago
5

Suppose sum and num are int variables, and the input is

Computers and Technology
1 answer:
katrin2010 [14]3 years ago
6 0

Answer:

110

Explanation:

The <em>Scanner</em> is a Java class that is used to take an input from user.

The <em>nextInt() </em>method will get an integer from user.

The while loop in the question is a sentinel loop where the loop will keep running until user input the sentinel value which is -1 to stop the loop.  This is important to note that, before the start of next iteration, the program will prompt the input for an integer from user.

While the loop is ongoing, the variable <em>sum </em>will be repeatedly added with input integer from user. If the input is 18, 25, 61,  6, the sum will be 18 + 25 + 61 + 6 = 110

You might be interested in
Examples of intermediate technology​
Effectus [21]

Example of intermediate technology is the treadle pump, which enables farmers to provide a greater amount of water to their plants more easily compared to watering by bucket, while requiring much less infrastructure than constructing irrigation dams and pipes.

3 0
3 years ago
Read 2 more answers
write a single expression that will return true if the lower four bits of x are the same as the lower four bits of y
horrorfan [7]

A single expression that will return true if the lower four bits of x are the same as the lower four bits of y is; (x & 0x0F) == (y & 0x0F)

<h3>How do you write single expression programs?</h3>

There are different methods of writing programs such as python and others. However, in this case, it is pertinent to know that this compiler that will return true if the lower four bits of x are the same as the lower four bits of y doesn't accept binary constants and as such we will use hexidecimal instead. For example; for 0b00111111, we will use 0x3F.]

Thus, using that same concept above, the single expression that will return true if the lower four bits of x are the same as the lower four bits of y is; (x & 0x0F) == (y & 0x0F)

Read more about writing computer programs at: brainly.com/question/16397886

6 0
2 years ago
Which of the following Information Technology career fields generally requires the lowest level of education for an entry-level
Art [367]
I believe the correct answer from the choices listed above is option A. The <span> Information Technology career fields that generally requires the lowest level of education for an entry-level position would be </span><span>Information Services and Support. Hope this answers the question.</span>
5 0
3 years ago
Read 2 more answers
You can use automatic link-checking software to identify invalid hyperlinks. if you find invalid links, what should you do next?
Solnce55 [7]
Correct the href value of the appropriate anchor.
7 0
3 years ago
Design the logic for a program that allows a usher to continuously enter numbers until the usher enters 0. Display the sum of th
uysha [10]

int sum = 0, n;

do {cin>>n; sum+=n;}while (n!=0);

cout<<sum;

5 0
4 years ago
Other questions:
  • _______________ is used by a hacker to mask intrusion and obtain administrator permissions to a computer.
    7·1 answer
  • Which of the following is small Java code script that adds functionality to web pages in a browser?
    7·1 answer
  • To keep a desktop computer or a server powered up when the electricity goes off in addition to protection against power fluctuat
    8·2 answers
  • The biggest risk for the elderly when considering technology is
    11·1 answer
  • Implement the following logic in C++, Use appropriate data types. Data types are represented as either numeric (num) or string.
    5·1 answer
  • . Service recovery refers to A. the ability to quickly restore service following a service failure and provide compensation. B.
    5·1 answer
  • A line in the Agile Manifesto reads, "____________ and _____________ over processes and tools". Please select which option best
    9·1 answer
  • Explain the applications software that you use everyday
    5·1 answer
  • Does survey monkey remembers you already took survey?
    8·1 answer
  • Complete the sentence.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!