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
Snowcat [4.5K]
3 years ago
13

Given a variable n refers to a positive int value, use two additional variables, k and total to write a for loop to compute the

sum of the cubes of the first n counting numbers, and store this value in total. thus your code should put 1*1*1 + 2*2*2 + 3*3*3 +... + n*n*n into total. use no variables other than n, k, and total.
Computers and Technology
1 answer:
maksim [4K]3 years ago
5 0
You could do it like this (example for n=5).

int n = 5;
int total = 0;
for (int k = 1; k <= n; k++) total += k*k*k;

You might be interested in
When LDAP traffic is made secure by using Secure Sockets Layer (SSL) or Transport Layer Security (TLS), what is this process cal
Simora [160]

Answer:

Authorization is granting permission for admittance. ACLs provide file system security for protecting files managed by the user. Rule-Based Access Control can be changed by users.

Explanation:

8 0
2 years ago
The height of a small rocket y can be calculated as a function of time after blastoff with the following piecewise function: y 5
SOVA2 [1]

Answer:

High level Language

understand

Explanation:

rocket is 0...4433456u888

5 0
2 years ago
What branch of science helps avoid or minimize stress-related injuries at workplace?
Vlada [557]

The answer is : Ergonomics.  This improvement process removes risk factors that lead to injuries and allows for improved human performance and productivity. Applying ergonomic solutions can make employees more comfortable and increase productivity. It is important because when doing a job and our body is stressed by an awkward posture, extreme temperature, or repeated movement your musculoskeletal system is affected.

7 0
3 years ago
Electronically, or on paper draw a Binary Search Tree using the values below. Note: Insert each value into the tree in order fro
maria [59]

Answer:

A.)  in order traversal - 9 32 35 14 27 25 2 7 29

B.) pre-order traversal - 25 14 32 9 35 27 7 2 29

C.) post-order traversal - 9 35 32 27 14 2 29 25

Explanation:

Given - 25, 14, 7, 32, 27, 2, 29,9,35

To find - On a separate electronic page or sheet of paper:

1. List the values using in order traversal

2. List the values using pre-order traversal

3. List the values using post-order traversal

Proof -

Given values are -

25, 14, 7, 32, 27, 2, 29,9,35

1.)

In order is -

9 32 35 14 27 25 2 7 29

2.)

Pre-order is - (Root left right)

List nodes of first time visit

25 14 32 9 35 27 7 2 29

3.)

Post-order is - (Left Right Root)

List nodes of third time visit

9 35 32 27 14 2 29 25

5 0
3 years ago
With a ____ indent, all lines except the first line of the paragraph are indented from the left margin.
hoa [83]

The answer to this question is a hanging indent. A hanging indent is a writing format where in the first line of the text or paragraph is being aligned in the left margin. A hanging indent is also known as the hanging paragraph.  

3 0
3 years ago
Other questions:
  • Explain which are of the brain you think might light up to show that you are telling a lie and why
    10·1 answer
  • Assuming that each of the resistors in the circuit shown in the figure above has a resistance value of 100 k ohms, what will be
    11·2 answers
  • RFID tags uses memory that is read-only.A. TrueB. False
    5·1 answer
  • According the Keown book, which Web-based personal financial planning website is known as "the best free way to manage your mone
    6·1 answer
  • Write a program that allows the user to enter the last names of five candidates in a local election and the votes received by ea
    12·1 answer
  • According to the government, employees have a right to understand the risks associated with the materials they work with.
    15·1 answer
  • Which of the following is NOT part of the URL for an Internet web site?
    13·1 answer
  • (03.05 LC
    14·1 answer
  • Create a method called randomValues that uses a while loop to generate a random number between 1-25 until the value 10 is genera
    12·1 answer
  • What is the result of the following code?<br><br> x=7//2+10%2**4<br><br> print(x)
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!