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
Kay [80]
2 years ago
7

How to add up multiple user inputs for example: If i ask the user How many numbers do you want to add? they say 5 then i out put

Enter 5 numbers: how can i get it to add up those 5 numbers that were input.In JAVA
Computers and Technology
1 answer:
Morgarella [4.7K]2 years ago
6 0

Answer:

import java.util.Scanner;

class Main {

 public static void main(String[] args) {

   Scanner scanner = new Scanner(System.in);

   System.out.println("How many numbers do you want to add?");

   int numberOfNumbers = scanner.nextInt();

   int arrayNumbers[] = new int[numberOfNumbers];

   System.out.println("Enter " + numberOfNumbers + " numbers:\n");

   for(int i = 0; i < numberOfNumbers; i++){

     int addToArray = scanner.nextInt();

     arrayNumbers[i] = addToArray;

   }

   int sum = 0;

   for(int j = 0; j < arrayNumbers.length; j++){

     sum+=arrayNumbers[j];

   }

   System.out.println("Sum: " + sum);

 }

}

Explanation:

You might be interested in
How do you make a ringtone on earsketch
RoseWind [281]

Haven't used earsketch, but here we go.

Answer:

1). Make a track in earsketch, make it like 6/7 seconds

2.) export your track as an .mp3, .wav, or  .ogg (your choice!)

3.) (If on android) Navigate to settings, now search for an entry for ringtone.

4.) If you have no luck, look up how to set ringtone on your desired phone brand (iOS, Android, etc.)

5.) Test out your new ringtone

6.)Profit

4 0
2 years ago
List the correct order of steps necessary to using usmt to migrate files from an old computer to a new computer.
dlinn [17]
The USMT (User State Migration Tool) is designed to assist IT professional migrate files to the windows OS. An example is a step by step migration of files and settings from a windows XP environment to windows 8 using USMT. At the end of the day, you will have used LoadState a ScanState to complete this end to end migration. The correct order is as follows; <span><span>


1.      </span>Gather Data Using the ScanState Tool</span>

<span>a)      </span>Install USMT

<span>b)      </span>Run ScanState to Create a Migration Store on the Server

<span>2.       </span>Install Windows

<span>a)      </span>Install Applications

<span>3.       </span>Apply Data Using the LoadState Tool

<span>a)      </span>Install the USMT

<span>b)     </span> Run LoadState






8 0
3 years ago
The 16 broad career options developed by the US department of education are called
In-s [12.5K]
The answer is career clusters. 
6 0
3 years ago
A file type that allows a document to be read on most computers is a _____.
Travka [436]
Txt

Note, only Windows really cares about the file extension. OSX's Finder will use it if Finder can't find a creator in the file metadata to select an app when double clicking on it. Linux and Unix don't care.
7 0
3 years ago
Forwarded events can only be recorded when systems ADMINISTRATORS have de-established an event subscription. TRUE or FALSE
weeeeeb [17]

Answer:

True

Explanation:

Forwarded events can only be recorded when systems administrators have de-established an event subscription.

8 0
2 years ago
Other questions:
  • Which activity cannot be done on a social networking site?
    12·1 answer
  • A digital footprint is all of the information on-line about a person posted by that person or others, ____________. intentionall
    14·1 answer
  • ____ languages create source code using words and structures similar to spoken language.​
    15·1 answer
  • My mac book airs touch pad stopped working and i can't click. what do i do?
    5·2 answers
  • after clicking the start button on your computer screen desktop what option would you then select to examine system components y
    15·1 answer
  • When evaluating the validity of a website beyond its URL, you can practice the "rule of 3" which means
    11·2 answers
  • What sorts of changes have you been observing in your society in your society in comparison in last 3 years​
    13·1 answer
  • For what purposes do students collect data? Check all that apply.
    7·2 answers
  • Write an algorithm to display your name 10 times​
    5·1 answer
  • Which can be used to create a poll on a web page? <br>CSS<br>HTML <br>JavaScript <br>Text editor​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!