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
HELP!! PLEASE!!!!!
aleksandr82 [10.1K]

Answer:

Isolate the variable by dividing each side by factors that don't contain the variable.

n=5, -5

5 0
3 years ago
Read 2 more answers
What is the value of X
bixtya [17]
All 3 angles have to add up to be 180 so the answer would be 90

5 0
3 years ago
Use the line of best fit of the given graph to help you choose the correct conjecture
just olya [345]

Answer:

b .based on the data, the faster the vehicle travels, the less time it will take to reach the destination.

8 0
3 years ago
Find an equation for the line passing through the points (-3,1) and (9,7)
WINSTONCH [101]
The you find this is by first finding the slope. You do this by finding the difference between both x values and then both y values. You get 12(x), 6(y) then write it as a fraction. it is 12/6 which simplifies to 2. 2 is our slope. then you write it out in slope intercept form (y=mx+b) and plug in your numbers. pick one set of original points an put them in to x and y. now you just solve for b. this gives you -9 as b. you put it together to get
y=2x-9
hope this helps!!!! :)
8 0
3 years ago
When you graph a linear equation, it will
umka21 [38]

Answer:

straight line, C

Step-by-step explanation:

The graph of a linear function is a straight line. Graphically, where the line crosses the x -axis, is called a zero, or root. Algebraically, a zero is an x value at which the function of x is equal to 0 . Linear functions can have none, one, or infinitely many zeros.

I hope this helps.

7 0
2 years ago
Other questions:
  • Please help thank you​
    11·1 answer
  • Write and real-world problem that could be represented by the inequality below:
    7·1 answer
  • On august 1st, a plant was 79 centimeters tall. in june of that year it grew 12 centimeters, then 9 more centimeters in july. ho
    6·1 answer
  • the yearly cost in dollars, y, at a video game arcade based on total game tokens purchased, x, is y = x + 60 for a member and y
    5·2 answers
  • Y = 2.2 + 5<br> Complete the missing value in the solution to the equation.<br> (2,<br> )
    9·2 answers
  • Large balloons are sold in packages of 12. Select the expressions that can represent the total number of balloons in p packages
    9·1 answer
  • A.27<br> B.63<br> C.163<br> D.153
    11·2 answers
  • A pilot takes a taxi from the airport to a hotel. The taxi driver charges a $2.50 initial charge plus $2.65 per mile. Which equa
    5·1 answer
  • 22 miles in<br> 3<br> hour<br> 4 4<br> Find the unit rate
    6·1 answer
  • What is 3/4 doubled as a fraction
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!