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
abruzzese [7]
3 years ago
5

Use two variables k and total to write a for loop to compute the sum of the squares of the first 50 counting numbers, and store

this value in total. thus, your code should put 1*1 2*2 3*3 ... 49*49 50*50 into total. use no variables other than k and total.
Mathematics
1 answer:
ohaa [14]3 years ago
8 0
I think the question means to "accumulate" or "sum" the individual squares in total.   "Store" in computer terms usually means overwriting what's already in total.

With the sens of "summing" or "accumulating", this is one way how it can be coded:

int total=0;
for k=1 to 50 {
    total+=k^2;
};
print(total);
You might be interested in
An airplane flying into a headwind travels the -mile flying distance between Indianapolis, Indiana, and Phoenix, Arizona, in hou
Nesterboy [21]

Answer:

the airspeed of the plane = 660 miles/hr

the speed of the wind = 60 miles/hr

Step-by-step explanation:

The values are missing in the given information in the question.

To able to solve this question, we will make some assumptions.

Let's assume that:

The airplane heading into the wind travels 1800 miles in 3 hours.

While returning via the same distance, it travels 2 hours 30 minutes.

We are to determine the plane's airspeed as well as the wind speed.

First, let us say that the speed of the plane is p and the wind speed is q

during the time the plane is traveling for 1800 miles in 3 hrs.

Then, we can say

3p -3q = 1800 ----- (1)

However, in  2hours 30 minutes, we have 2.5 hours

So, when the plane is returning, we have the following equation:

2.5p + 2.5q = 1800 ---- (2)

So, to find p and q, we can use the elimination method.

Simply by multiplying equation (1) with 5 and equation (2) with 6

 (5)3p    -  (5)3q     = (5) 1800

 (6)2.5p  + (6)2.5q = (6) 1800            

  15p -  15q  = 9000

+

<u>  15p + 15q   = 10800       </u>

<u>  30p -  0     = 19800       </u>

<u></u>

30p = 19800

p = 19800/30

p = 660

Since p = 660, then from equation (1) we can obtain the value of q:

So; Using equation (1):

3p -3q = 1800

3(660) - 3q = 1800

1980 - 3q = 1800

-3q = 1800 - 1980

-3q = -180

q = 180/3

q = 60

Therefore, the airspeed of the plane = 660 miles/hr

the speed of the wind = 60 miles/hr

8 0
3 years ago
I need help please‼️‼️‼️
NemiM [27]
The answer is
x+y=10
20x+30y=280
8 0
3 years ago
Could the table of (x,y) pairs
Brums [2.3K]

Answer:

Yes.

Step-by-step explanation:

Linear functions mean a straight line.

7 0
3 years ago
Read 2 more answers
A county fair charges $5 for tickets and $2 for each ride. What is the y-intercept in this scenario?
zhenek [66]

Answer:

2

(I think) ¯\_(ツ)_/¯

Step-by-step explanation:

cause 5 would be X and then that leaves 2 for Y

(5,2)

(X,Y)

6 0
3 years ago
Read 2 more answers
Solve the following equation or inequality for the unknown variable. Round answer to two decimal places if necessary.
Sonbull [250]

Answer:

x = 2.7

Step-by-step explanation:

The given equation is :

(3x)^2-10=56

We need to solve it for x.

It can be rewrite as follows:

9x^2-10=56

Adding 10 to both sides,

9x^2-10+10=56+10\\\\9x^2=66\\\\x=\sqrt{\dfrac{66}{9}}\\\\x=2.70

So, the value of x is equal to 2.7.

3 0
4 years ago
Other questions:
  • PLEASE HELP!! WILL MARK BRAINLIEST AND THANK YOU!!!
    15·1 answer
  • Find three consecutive even integers whose sum is 180
    8·1 answer
  • Why was Russia slow to modernize?
    9·1 answer
  • A science fair poster is a rectangle 3 feet long and 2 feet wide. What is the area of the poster in square inches?
    11·1 answer
  • Answer The forth question I will give u 95 points and the brilliantist
    7·2 answers
  • &lt;
    10·1 answer
  • Tyler’s brother works in a shoe store.
    7·1 answer
  • 4(x-3)/8=y change the subject to x
    15·1 answer
  • Suppose the shipping weight of your cheese shop's customized gift baskets is asymmetrically distributed with unknown mean and st
    10·1 answer
  • Ordered benedryl syrup 50mg po qid. available 4 g in a 8 oz. bottle. how many mls will you give?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!