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
erastovalidia [21]
3 years ago
7

ven int variables k and total that have already been declared, use a while loop to compute the sum of the squares of the first 5

0 positive integers 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.
Computers and Technology
1 answer:
monitta3 years ago
3 0

Answer:

Following are statement is given below

int  k=1,total=0; // variable declaration

while(k<50) // iterating the while loop

{

   total=total+k*k;//  calculating the square

   k=k+1; // increments the value of k by 1    

}

Explanation:

Following are the description of Statement.

  • Declared a variable "total" and "k" of the "integer " type initialized the total to 0 and "k" to 1.
  • Iterating the while loop for less then 50 .In this loop, we calculating the sum of square of first 50 number in the "total" variable .
  • After that increment the value of "k" variable by 1 to execute the loop less then 50 .

You might be interested in
Predict the future that social media will have on society or the environment
hichkok12 [17]

Answer:

The future that this world holds for Social media may as well be known as the end of self opinions. This is because now  a days many people seek the opinions of others and no longer take there opinions into count. Social media can also damage the environment. This is because since people are on there phone longer bc of social media they also need to charge there phone more, which needs electricity, which comes from the burning of fossil fuels .

5 0
3 years ago
What questions do they ask for the 08.03 Discussion- Based Assesment in Drivers Ed?? Thanks.
mel-nik [20]

When should my headlights be turned on?

Why shouldn't one take medication before driving?

Why must you use a turn signal?

I'm not sure about that last one because I forgot but I think its right.

6 0
4 years ago
If there are 10 routers between the source and destination hosts, how many transport processes will be involved on all devices?
Gnesinka [82]

Answer:

c. 2

Explanation:

As the routers are only involved with the process of finding the best route to reach an IP address (the destination hosts), they don't look at the IP Datagram payload (which includes the transport protocol header), only to IP header.

So, the only transport processes that "talk"each other, are the one on the source host (defining TCP or UDP source port/s, and the other  on the destination host (defining TCP or UDP destination port/s), so two applications (or more) in both machines can exchange data.

5 0
3 years ago
Ryan has made a presentation of ten slides, which he wants to display in sequence after a specific time interval. Which element
Sonja [21]
It's called transition or effects lol
7 0
3 years ago
Read 2 more answers
Internet control message protocol (icmp) is a method of ip address assignment that uses an alternate, public ip address to hide
Elanso [62]
B False





---------------------------------
3 0
4 years ago
Other questions:
  • What type of topography should Carlos choose?
    5·1 answer
  • Which of the following phrases describes top-down processing
    8·1 answer
  • Write a simple compilable program that outputs to an Excel-compatible XLS file these two rows: (1) a header row with headings fo
    10·1 answer
  • Assume that the type NAME has already been defined. Define a new type, SREC that is a structure consisting of two fields: name (
    5·1 answer
  • Joining strings together is known as?
    7·1 answer
  • Horizontal lines should be avoided in photographs because they make the photograph appear small.
    8·1 answer
  • CHEMISTRY. metal+water》base+...............​
    12·1 answer
  • When two conductors are accidentally connected it is<br> called a
    6·1 answer
  • What does RFID use for wireless communication?<br> Infrared<br> IoT<br> Smart chip<br> Tag
    14·1 answer
  • A friend complains that she is always running out of money even though she “never buys anything expensive.” What advice would yo
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!