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
दूलह श्री रघुनाथ बने दुलही सिय सुंदर मंदिर माहीं।
svetlana [45]

Answer:

The bridegroom Shri Raghunath, Gavati Geet Sabai Mili Sundar Bed Juwa Jury Vipra Padhahin, Janaki, and Kankan.

Explanation:

8 0
3 years ago
describe how sodium ammonium chloride can be separated from a solid mixture of ammonium chloride and anhydrous calcium chloride​
kirill115 [55]

Answer:

There are way in separating mixtures of chlorides salts such as that of sodium chloride and ammonium chloride. It can be done by crystallization, filtration or sublimation. If we want to separate the mixture, we have to heat up to 330-350 degrees Celsius and collect the gas that will be produced.

5 0
3 years ago
Marien is using the Council of Science Editors (CSE) style guidelines to write her research paper. What is her most likely topic
slega [8]

(CSE) style is used in scientific research papers. In this style there are three systems of documentation, but all of them are appropriate styles to write a scientific paper and make proper references to them. Although all could in some context be taken as scientific, only one really pops out and that's biology.

3 0
4 years ago
____________ is using digital media safely, responsibly, and ethically.
Ronch [10]

I think it may digital citizenship

8 0
4 years ago
Read 2 more answers
There are 4 classrooms for fifth grade and 4 classrooms for sixth grade at a school. Each classroom has 20 students. A teacher i
olga_2 [115]

Answer:

what do you want

Explanation:

there are 160 people in all if thatś what you want

5 0
3 years ago
Read 2 more answers
Other questions:
  • What is output with the statement System.out.println(x+y); if x and y are int values where x=10 and y=5? Group of answer choices
    10·1 answer
  • Which type of network topology connects multiple devices to a central device?
    7·1 answer
  • Hey so if an instagram account has an email attached to it but a person no longer has access to that email, how do they get back
    10·1 answer
  • Routing protocols that enable routers to communicate beyond neighboring routers, allowing each router to independently map the n
    7·1 answer
  • Which of the following is not a valid variable name? 2 myInt 2. return 3. myInteger 4. total3
    6·1 answer
  • Hi, please help me.solution.​
    7·1 answer
  • Audiovisual technology is not important in a world that is interactive
    7·1 answer
  • Describing the One-to-Many Relationship
    13·2 answers
  • It is the "executable" phrase of Word<br>Wide Web with dynamic applications,?<br>​
    9·1 answer
  • What does input allow a computer to do
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!