Given int variables k and totalthat have already been declared, use a for loop to compute the sum of the squaresof the first 50 counting numbers, and store this value in total. Thus your code should put 1"1 + 2"2 than k and total + 49 49 + 50'50 into total.Use no variables other

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 6RQ
icon
Related questions
Question

Pls do for java

Given int variables k and totalthat have already been declared, use a for loop to compute the sum of the squaresof 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.
Transcribed Image Text:Given int variables k and totalthat have already been declared, use a for loop to compute the sum of the squaresof 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.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,