answer.
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
Slav-nsk [51]
1 year ago
6

Given an array of ints named x and an int variable named total that has already been declared, write some code that places the s

um of all the elements of the array x into total. Declare any variables that you need.
Computers and Technology
1 answer:
Marizza181 [45]1 year ago
8 0

Answer:

Following are the code:

Code:

total = 0; //assign value to total variable.

for (int i=0; i<x.length; i++) //for loop

{

total=total+x[i]; //add all array elements in total variable.

}

Explanation:

In the following question, it is defined that x and total is variable. Where variable x is an integer type array and total is an integer variable. we define some code for calculating the sum of the array element. In the above code, we use for loop that calculates sum of array elements that can be described as:

  • To calculate the sum we use the total variable. In total variable, we assign value 0.
  • Then we define for loop in loop we use total variables that add all array (x[]) elements.

You might be interested in
HackerCards is a trendy new card game. Each type of HackerCard has a distinct ID number greater than or equal to 1, and the cost
joja [24]

Answer:

I don't know if this is right output is {1,3}

Explanation:

5 0
1 year ago
What does NOT match with Agile Manifesto?
Butoxors [25]

Answer:

yes

Explanation:

7 0
2 years ago
The act of engaging in crime through the use of a computer or similar type of device is called:
marin [14]
I don’t have an explanation for why it is called this, because really the name of it is in its definition. The two words this sentence describes are cybercrime and computer crime. They are both the same thing.
8 0
2 years ago
Omar’s teacher has asked him to send her a PDF copy of his presentation via email.
Vadim26 [7]

Answer:

1. Export

2. Create PDF/XPS document

3. Standard

4. Click Publish

Explanation:

I got wrong on edg and found the correct answer

8 0
2 years ago
JAVA...Write a statement that calls the recursive method backwardsAlphabet() with parameter startingLetter.
scoray [572]

Answer:

RecursiveCalls.backwardsAlphabet(startingLetter);

Explanation:

The statement that is needed is a single-line statement. Since the class RecursiveCalls is already in the same file we can simply use that class and call its function without making a new class object. Once we call that class' function we simply pass the variable startingLetter (which is already provided) as the sole parameter for the function in order for it to run and use the letter 'z' as the starting point.

       RecursiveCalls.backwardsAlphabet(startingLetter);

3 0
1 year ago
Other questions:
  • Which type of utp cable is used to connect a pc to a switch port?
    10·1 answer
  • 1.Which of the following class definitions defines a legal abstract class?a. class A { abstract void unfinished() { } }b. class
    7·1 answer
  • Suppose that a scheduling algorithm (at the level of short-term CPU scheduling) favors those processes that have used the least
    10·1 answer
  • Using python,
    15·1 answer
  • In defining security implemention, what are the roles of the following committees. 1) gateway committee 2) project committee 3)
    8·1 answer
  • Write a flowchart and C code for a program that does the following: Within main(), it asks for the user's annual income. Within
    12·1 answer
  • Suggest how the following requirements might be rewritten in a quantitative way. You may use any metrics you like to express the
    7·1 answer
  • Write an expression that continues to bid until the user enters 'n'.
    9·1 answer
  • Which group contains the command to manually conduct a spell check ?
    9·1 answer
  • A school has 100 lockers and 100 students. All lockers are closed on the first day of school. As the students enter, the first s
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!