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
Pendant Publishing edits multi-volume manuscripts for many authors. For each volume, they want a label that contains the author'
lbvjy [14]

Answer:

Check the explanation

Explanation:

Pseudocode For Reading File:

start

Declarations

InputFIle records.txt

OutputFile result.txt

string authorName

string title

int numOfVol

open InputFile

open OutputFile

input authorName, title, numOfVol from records.txt

while not eof

output authorName

output title

output numOfVol

end while

close records.txt

close results.txt

END

The flowchart for reading the file can be seen below.

3 0
3 years ago
What is the most efficient way to include a space after each paragraph
3241004551 [841]

To skip a line, then write the rest like this!


See? Good spacing, right?

4 0
3 years ago
What is the purpose for adding images and graphics to a web page?
m_a_m_a [10]
A. This is very important to keep your readers/users interested in your content / organization or whatever.
8 0
3 years ago
Whose massively popular photo led to the creation of google images?
Alex
Jennifer Lopez’s picture led to the creation of google images.
5 0
3 years ago
What is the basic purpose of Google calendar?
goldenfox [79]
The basic purpose of a google calendar is basically the same as a regular calendar. it is used to keep track life's important events all in one place.    
7 0
3 years ago
Read 2 more answers
Other questions:
  • Casting is one of the oldest known manufacturing processes. <br> True or false
    6·2 answers
  • Is it just me or is brainly not working right now? I am trying to add friends and it won't let me!
    5·2 answers
  • What is a quick way to close the header or footer view in a microsoft word document?
    12·1 answer
  • Which line in the following program contains the header for the showDub function? 1 #include«iostream» 2 using namespace std; 4
    15·1 answer
  • Write a paragraph on the following topic.
    14·1 answer
  • Fact about energy that will make a knex car move
    7·2 answers
  • True/False
    13·1 answer
  • i know this not school related but my grandmothers RCA RCT6272W23 tablet is saying type password to decrypt storage and i dont k
    5·1 answer
  • Write the header file Stadium.h for a Stadium class. The Stadium class has the following data members: 1) an array of 1000 Seat
    7·1 answer
  • 35 POINTS
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!