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
adoni [48]
3 years ago
5

Consider the program below: public class Test { public static void main( String[] args ) { int[] a; a = new int[ 10 ]; for ( int

i = 0; i < a.length; i++ ) a[ i ] = i + 2; int result = 0; for ( int i = 0; i < a.length; i++ ) result += a[ i ]; System.out.printf( "Result is: %d\n", result ); } // end main } // end class Test The output of this program will be:
Computers and Technology
1 answer:
Anna11 [10]3 years ago
3 0

Answer:

Result is: 65

Explanation:

To analyze this code let us asign line numbers:

  1. public class Test {
  2.    public static void main( String[] args )
  3.    { int[] a; a = new int[ 10 ];
  4.        for ( int i = 0; i < a.length; i++ )
  5.            a[ i ] = i + 2;
  6.        int result = 0;
  7.        for ( int i = 0; i < a.length; i++ )
  8.            result += a[ i ];
  9.        System.out.printf( "Result is: %d\n", result );
  10.    }
  11. }

On line 3, an array of ints is created of size 10

On line 4 and 5 a for loop is used to add values to the array. at the end of the execution of line 4 and 5, the array will contain the following elements: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11]

On line 6 an int variable result is created and initialized to 0

line 7 and 8 allows a for loop through the array adding up all the elements of the array and assigning them to result

Line 9 outputs the value of result (Which is the total sum)

You might be interested in
Why can’t I “change the country” on settings??<br> (In this app)
Serjik [45]
I don't think it has an option to change your country. If you'd like to see things in a different language, that's probably a different story.
7 0
2 years ago
5. How should you use LinkedIn Answers as a professional?
harkovskaia [24]

The LinkedIn Answers is a component of LinkedIn that allows you to get fast and accurate solutions to your questions. It provides a forum through which you can demonstrate your expertise by offering info to your network. You should use LinkedIn answers to ask and answer questions. Essentially, you should use it to provide examples to your work product, decision making skills, and on an interactive basis.






5 0
3 years ago
joe is in the planning stages to make sure that an upcoming company promotion during a major sporting event will not overwhelm h
VikaD [51]

The possible solutions to recommend are that Vertical scaling, Horizontal scaling, Cloud bursting

The cloud computing business model is based on a utilitarian business model, which charges you solely for the resources you use. With this strategy, you may scale your cloud fleet to suit its present workload and add and subtract capacity as needed. Variability may be used to scale cloud services in a variety of ways, including vertical and horizontal scaling and bursting. Horizontal scaling in cloud computing refers to adding more instances rather than switching to a bigger instance size. Vertical scaling involves the addition of more or faster CPUs, memory, or I/O resources to an existing server or the replacement of one server by a more physical server.

Learn more about the utility business model here: brainly.com/question/28668154brainly.com/question/29349562

#SPJ4

3 0
1 year ago
Evaluating how current, credible, and unbiased a source is ensures:
Tanya [424]

The answer is

A. your information is more accurate and useful

I hope it helps you. Please mark me brainliest answer.

6 0
2 years ago
A fast way to add up a column of numbers is to click in the cell below the numbers and then: Click Subtotals on the Data menu. V
Art [367]

Answer:

Click the AutoSum button on the Standard toolbar, then press ENTER

Explanation:

Excel offers a range of options to perform various mathematical operations. When numeric values are being inputted into cells, either columns or rows, the AutoSum function which is located in the home Taskbar allows for a very fast addition of the total values in the column or rows. Once the cell after the last cell value is selected, the AutoSum function is selected and the ENTER button is pressed, this will use the sum function of excel to quickly provide the total sum of all the values in the column.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Read the spreadsheet formula below, then answer the question.
    14·2 answers
  • Which of the following was one of the first internet search engines? A. archie B. google C. Yahoo D.ask
    7·1 answer
  • Joshua takes ownership of all his tasks. Which quality is he demonstrating?
    9·2 answers
  • To prevent unauthorized access and use, at a minimum a company should have a written __________ that outlines the activities for
    6·1 answer
  • Benching system are prohibited in
    5·1 answer
  • We combine the three binary bits 1, 0, and 1 to form 101 in order to represent the number 5. What does the leftmost 1 in 101 mea
    15·1 answer
  • There are types of templates​
    5·1 answer
  • In confirmatory visualization Group of answer choices Users expect to see a certain pattern in the data Users confirm the qualit
    9·1 answer
  • The use of a concept or product from one technology to solve a problem in an unrelated one
    11·1 answer
  • Many large companies use the word(s), _____, to refer to the huge network of computers that meets their diverse computing needs.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!