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
valina [46]
3 years ago
6

JAVA

Computers and Technology
1 answer:
ryzh [129]3 years ago
7 0

import java.util.Scanner;

public class JavaApplication33 {

   public static void main(String args[]) {

     Scanner scan = new Scanner(System.in);

     int total = 0;

     System.out.println("Enter positive numbers (-1 to stop)");

     while (true){

         

         int num = scan.nextInt();

         if (num == -1){

             break;

         }

         else{

             total += num;

         }

     }

     System.out.println("Sum is "+total);

     

}

}

I hope this helps!

You might be interested in
Which of the actions below will not create more room on your hard drive?
slavikrds [6]
A. defragging your hard drive
4 0
3 years ago
Es el nombre que se le da a la<br> intersección de una columna y fila:
BARSIC [14]

Answer:

en ingles es cell

Explanation:

3 0
3 years ago
12. Because Java byte code is the same on all computers, compiled Java programs a. are nonexistent b. must be re-compiled for ea
GenaCL600 [577]

Answer:

C) Highly portable

Explanation:

This means they can run on any computer or platform that supports Java without the need for recompillation.

This idea is popularly called WORA that is Write Once Run Anywhere.

Software Applications written in Java are compiled to bytcode (.class) which are intended to run on the Java Virtual Machine (JVM) irrespective of the architecture of the computer or device.

5 0
3 years ago
What are the functions of an input device​
marshall27 [118]

Answer:

To feed the computer with data/instructions

6 0
3 years ago
Read 2 more answers
AN OBSTACLE OR BARRIER THAT MAY PREVENT YOU FROM ACCOMPLISHING YOUR GOAL IS:
marishachu [46]
Depends on what kind of goal.
If I gave a goal of eating 8 hot dogs then a barrier would be a physical will of your body to not eat more. It would be a limit your body can take so it’s different from a mental or other barrier.
If you wanted to cross an area of land but there is a fence in the way then that’s another type of barrier.
Or there are mental barriers. If you wanted to ask someone out to prom, you may be stopped by a mental barrier of self hatred. Feeling like you’re not good enough.

Hopefully this helps!
5 0
4 years ago
Other questions:
  • Why would a designer choose to use an isometric sketch rather than a perspective sketch to share their idea with a design team m
    14·1 answer
  • Mark for review (Will be highlighted on the review page) 11. A feature in Excel that allows you to graphically display in a sing
    10·1 answer
  • Angela recently purchased a new Android smartphone. While purchasing the phone, Angela was told that she would need to set up a
    14·1 answer
  • Which of the following is the definition of registration authority ( RA)?
    10·1 answer
  • What problems does the swim coach have? Use details from the story to support your answer.
    7·1 answer
  • Why was the cooper black font made?
    5·1 answer
  • Which of the statements below are true? Which are false?
    14·1 answer
  • Adding a border to an image is one way to manipulate media to spice up a project. Where do you find the Picture Styles command t
    15·1 answer
  • Which is the base class in the following statement? class car : public vehicle
    13·1 answer
  • A _______ attack is where the input includes code that is then executed by the attacked system.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!