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
Helga [31]
2 years ago
5

Write a program that passes an unspecified number of integers from command line and displays their total. Sample Run 1 command&g

t;java 1 2 3 4 5 The total is 15 Sample Run 2 command>java 1 9 1 1 1 The total is 13 Class Name: Exercise07_21
Computers and Technology
1 answer:
Lana71 [14]2 years ago
5 0

Using the computational language in JAVA it is possible to write a code that at least passes an unspecified number of integers

<h3>Writing code in JAVA</h3>

<em>class Exercise07_21</em>

<em>{</em>

<em>public static void main(String args[])</em>

<em>{</em>

<em>int sum=0;</em>

<em>for(int i=0;i<args.length;i++)</em>

<em>sum=sum+Integer.parseInt(args[i]);//converting string to integer and then adding it with sum variable and storing back in sum</em>

<em>System.out.println("The total is "+sum);//printing the sum</em>

<em>}</em>

<em>}</em>

See more about JAVA code at brainly.com/question/12975450

#SPJ1

You might be interested in
Why is it important to send a cover letter with a resume?
Novay_Z [31]
It's important to do so because you want to be sure it looks professional, just like it's important to add a cover to a report. It's also the first look at the resume and gives the overall look of it. It lets the job or employer know the specifics and into the resume talk more of what you do. It's like the overall information page..... Hope this helps. 
5 0
3 years ago
Read 2 more answers
Interactive television with video-on-demand capabilities changes how people watch television and how consumers access the Intern
Alex787 [66]

Answer:

High learning

Explanation:

High Learning means that a product require significant customer education before customers understand how the product functions and that may make the product stay longer in the introduction stage whilst the customers are being familiarize with it. Examples are microwave ovens.

6 0
3 years ago
In the context of applications of artificial intelligence (AI), _____ perform well at simple, repetitive tasks and can be used t
Elina [12.6K]

Answer:

The right response is "Robots ".

Explanation:

  • A robot seems to be an independent machine that can detect its surroundings, conduct simulations, as well as take action throughout the modern or actual environment.
  • It is indeed a piece of computer-controlled equipment, which would also be utilized autonomously for carrying out duties or other hazardous tasks.
7 0
3 years ago
What aspect should you consider before adding pictures to a document?
Luden [163]

Answer:

information?

Explanation:

picture are there to give a visual or make the document more appealing. if your wording and information isnt up to date or reasonable people wont lean to what you are saying as much.

8 0
3 years ago
Read 2 more answers
Que cambiaría personalmente en esos momentos de cuarentena​
Natali5045456 [20]
No poder salir sin estar con la duda de que si una persona con la que estas cercas tendría el virus , no poder visitar a ciertas personas
6 0
4 years ago
Other questions:
  • Consider the code below. Note that the catch statements in the code are not implemented, but you will not need those details. As
    11·1 answer
  • You can execute three main types of linux commands. what are they?
    8·1 answer
  • The set of instructions that directs the computer to perform a variety of tasks is known as a
    9·1 answer
  • Which of the following is not a good technique for photographing groups? Visiting the location.
    9·1 answer
  • If the physical memory size is doubled without changing any of its other parameters, the number of entries in the page table
    5·1 answer
  • To save a file so that it can be opened on most computers, select the ____ option.
    10·2 answers
  • Who created the first photograph
    9·2 answers
  • Implement the function printTwoLargest that inputs an arbitrary number of positive numbers from the user. The input of numbers s
    14·1 answer
  • LAB: Convert to binary - methods
    11·1 answer
  • State the Limitations of the first generation of computers​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!