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
ehidna [41]
3 years ago
8

Write an application named SumInts that allows the user to enter any number of integers continuously until the user enters 999.

Display the sum of the values entered, not including 999.
Computers and Technology
1 answer:
Nana76 [90]3 years ago
4 0

Answer:

import java.util.Scanner;

public class num10 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter the numbers to add up. enter 999 to stop");

       int num = in.nextInt();

       int sum = 0;

       while (num!=999){

           sum = sum+num;

           System.out.println("Enter the next number");

           num = in.nextInt();

       }

       System.out.println("The sum is: "+sum);

   }

}

Explanation:

The application is implemented in Java

A while loop is used to continously prompt user for inputs. The condition of the while loop is  while (num!=999)

When the number 999 is entered, it displays the sum which is initialized to 0

You might be interested in
Sushant is a new manager and he wants to share his ideas and working protocol with his team.Compare the advantages and disadvant
saw5 [17]

Answer:

Advantages of Oral Communication

  1. Use of visual aids like PowerPoint presentation while explaining his ideas and working protocols would help his team to understand him better.
  2. There is a spontaneous response from the staff which is more genuine than written response.

Disadvantages of Oral Communication

  1. It could prove to be a problem if Sushant has stage fright or is not an effective communicator, which could form an impression of him by the staff.
  2. Staff may forget some of Sushant's words as no memory is as reliable as written information.

Advantages of Written Communication

  1. A well written memo explains the ideas and working protocols that Sushant wants to relay to the staff.
  2. There could be a questionnaire for the staff to give feedback.
  3. Aims, objectives are clearly stated.

Disadvantages of Written Communication

  1. If the written material is too lengthy, it could be a problem to learn or memorise.

It is recommended that Sushant should use written form of communication to convey his ideas and working protocols as it is more effective.

3 0
3 years ago
Which of the following is the correct binary representation of the number 2?
dusya [7]

Answer:

10

Explanation:

To convert decimal to binary, you just count like normal, but instead of regrouping when adding 1 when you reach 9, you regroup when you reach 1.

in this case, you would count like this:

0

1

10

7 0
3 years ago
Think back over the information presented in the lesson about how you can skillfully use the Internet when doing research. Selec
madreJ [45]

Avoid wikipedia, anyone can put answers down on there and make it seem correct but it is not. Do not trust any website research the websites or look at ratings if possible. Use the answers that google provides itself if possible. And research trusted websites.

If this helped please mark me as brainlest.

\left[\begin{array}{ccc}Thanks,\\JustSomeIdiot\end{array}\right]

7 0
3 years ago
What are the challenges of photographing at night? Why did the photographer “paint” the waterfall with the flashlight?
lianna [129]
Because he needed ligh
7 0
3 years ago
3. When code tracing, why is it important to iteratively test parts of the program?
GenaCL600 [577]

Answer:

A. To isolate errors in the outcomes of code.

<em>Hope this helps! ^-^</em>

<em>-Isa</em>

7 0
3 years ago
Other questions:
  • Which is a function of network media?
    11·2 answers
  • A _____ is a device that not only provides surge protection, but also furnishes desktop computers and network devices with batte
    7·1 answer
  • Două numere a și b sunt numite generatoare ale unui număr natural n dacă a∙b+[a/b]=n, unde s-a notat cu [c] partea întreagă a nu
    7·1 answer
  • Georgenotfound??? question mark??
    15·2 answers
  • William found out that someone used his report on american culture without his permission. what is william a victim of?
    11·1 answer
  • The type of e-cards that have an antenna built into them are __________ cards.
    10·2 answers
  • Consider the code fragment below. Show the values stored at each location in memory and as they change while the code executes.
    5·1 answer
  • Which of the following is a particularly useful feature of Microsoft PowerPoint and
    8·2 answers
  • What command will prevent all unencrypted passwords from displaying in plain text in a configuration file?.
    9·1 answer
  • When one loop appears inside another, the loop that contains the other loop is called the ____ loop. Group of answer choices ind
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!