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
Zina [86]
3 years ago
15

Given an int variable n that has been initialized to a positive value and, in addition, int variables k and total that have alre

ady been declared, use a for loop to compute the sum of the cubes of the first n whole numbers, and store this value in total. Use no variables other than n, k, and total.
Mathematics
1 answer:
azamat3 years ago
6 0

Answer:

total = 0;

for (k = 0; k <= n; k++)

total += Math.pow(k,3);

Step-by-step explanation:

Here the variable total is declared and initialized with a value zero  

Then a for loop is defined with a counter k whose initial value is set to zero then a condition for the loop is that the counter k does not exceed n k<=n and then within the loop a statement which add the cube of the counter k to the variable total and still assigns it to the variable total is defined

  total += Math.pow(k,3);

What this program does is to obtain the sum of the cubes of k

You might be interested in
What is -6+-3 equal integers
saul85 [17]

Answer:

Step-by-step explanation:

-6+(-3)

-6-3

Answer is -9

6 0
3 years ago
Allie has $20 to spend to take some friends bowling. It costs $4 per person to rent shoes. The bowling alley is running a specia
forsale [732]

Answer:

Step-by-step explanation: she can have four people go and have the last 4 dollers can go in to her buying the lanes

4 0
3 years ago
Read 2 more answers
11. What's the perimeter of a regular heptagon if one side measures 3 inches?
NemiM [27]
When a polygon is regular, that means that all of its sides are the same length and all of its angles are the same. A heptagon has seven sides and you know that all of them measure 3 inches. You can find the perimeter by adding all of the side measures together, so 3 + 3 + 3 + 3 + 3 + 3 + 3, or 3 x 7. So, the perimeter of the heptagon is 21 inches.
7 0
3 years ago
Two triangles are similar. The perimeter of the smaller one is 16. The ratio of the corresponding sides is 2:5. The sides of the
Eddi Din [679]

Answer:

Perimeter of larger triangle is 40.

Step-by-step explanation:

Given:

Perimeter of smaller circle = 16

Ratio of corresponding side = 2:5

We need to find the perimeter of the larger triangle.

Solution:

Let the perimeter of the larger triangle be 'x'.

Therefore by theorem which states that;

" When a triangle have scale factor a:b then the ratio of the perimeters is a:b".

Here Ratio is 2:5, so we can say by theorem, Ratio of perimeters is 2:5

framing in equation form we get;

\frac{\textrm{Perimeter of smaller triangle}}{\textrm{Perimeter of Larger triangle}}=\frac{2}{5}

Substituting the values we get;

\frac{16}{x}=\frac{2}{5}

By Cross multiplication we get;

16\times 5=2x\\\\80=2x

Dividing both side by 2 we get;

\frac{80}{2}=\frac{2x}{2}\\\\x=40

Hence Perimeter of larger triangle is 40.

7 0
4 years ago
What the definition of a circle
klasskru [66]
It depends, but most of the time it's<span> a round plane figure whose boundary (the circumference) consists of points equidistant from a fixed point.</span>

4 0
3 years ago
Other questions:
  • I NEED HELP ASAP PLEASEE
    15·1 answer
  • Suppose the spread of a direct contact disease in a school is modeled by the exponential function P(t) =
    14·1 answer
  • Evaluate the polynomial when x=4 when x= -1 in -5x+2
    8·1 answer
  • Part A: Solve P = 4a for a. Show your work. (4 points) Part B: Solve 3c − 5f = 55 for f. Show your work. (6 points)
    5·1 answer
  • Sabrina rounded the size of the park to the nearest thousands acres. Her estimate was 276,000 acres. What number could be the ex
    5·2 answers
  • Estimate a 15% tip on a dinner bill of $49.76 by first rounding the bill amount to the nearest ten dollars​
    8·2 answers
  • I need help ASAPPP<br> Plsssss
    12·2 answers
  • Clean123 Inc. is preparing its balance sheet. It has $59,000 in accounts receivable, $32,000 in accounts payable, $41,000 in not
    8·1 answer
  • A van moves with a constant speed of 36 miles per hour How long will it take to travel a distance of 177 miles?​
    5·1 answer
  • What is the slope of the graphed line?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!