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
Both employers and employees have responsibilities and ___________.
Alex787 [66]

I would guess that the answer is Rights.

4 0
3 years ago
Read 2 more answers
Why is it important to have user accounts? describe the purpose, features and functions of user accounts (including administrato
TEA [102]
Its important to have user accounts so you can save data and maybe log in and out of a device/cmp to another one. The purpose of the user account is to help save your stuff and personalize your device. The features are more data storage to add up, and ability to make more accounts for others so each of you can personally have their own account and save their own data on their own. Administrator accounts are the highest and have the most power of all, they are in charge of everything, especially giving permission to apps you may have downloaded and removing system apps. Users rights are the tasks specific users can do to make sure no user has too much power or less so to speak and it means what you are able/not able to do as well.
5 0
3 years ago
A user is experiencing slow performance with their computer. A technician suspects the computer has a virus and runs antivirus s
IceJOKER [234]

Answer:

The answer is "Option A"

Explanation:

Escalation is the process of manipulating a bug, design failure in software program to obtain elevated access to the resources, which are usually shielded from the user, and wrong choices can be described as follows:

  • In option B, It is wrong because It can't provide any type of problem-solving.
  • In option C, It is wrong because it is a searching module.
  • In option D, It is wrong because it is used to verify the system.
6 0
3 years ago
(GAME DESIGN)
Sliva [168]

Answer:

A. When an object is in a specific position on a frame

Explanation:

In the testing phase of a new game, the errors of the programming process are corrected and the gameplay is improved as the game is tested. The objective of correcting serious defects and improving fundamental characteristics not contemplated in the design document, detecting minor failures and profiling the user experience.

8 0
3 years ago
Which input and output pair is correct for a bicycle?
mrs_skeptik [129]

Answer:

I'm pretty sure its B.

Explanation:

Input: Force is applied to the pedals by the rider's feet then..

Process: the chain and gear system convert the energy to cause...

Output: the rear wheels to turn and make the bike go foward

6 0
3 years ago
Other questions:
  • This project involves writing a program that encodes and decodes messages. The program should prompt the user to select whether
    15·1 answer
  • Any part of the computer that you can touch is called ________.
    6·1 answer
  • Assuming the Direct Hashing function and the Subtraction preprocessing algorithm is used to map keys into indices, give the inde
    15·1 answer
  • Which of the following is NOT a useful strategy when making an informed purchase ?
    7·1 answer
  • You’ve just finished training an ensemble tree method for spam classification, and it is getting abnormally bad performance on y
    9·1 answer
  • Eliza needs to share contact information with another user, but she wants to include only certain information in the contact. Wh
    9·2 answers
  • Someone please help will mark as brainliest
    8·2 answers
  • What is the gear ratio?
    12·1 answer
  • Anyone trying to play fortnite ? im bored lol
    6·2 answers
  • PLEASE HELP! :)
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!