Ask Question

Use the variables k and total to write a while loop that computes the sum of the squares of the first 50 counting numbers, and associates that value with total. Thus your code should associate 1*1 + 2*2 + 3*3 + ... + 49*49 + 50*50 with total. Use no variables other than k and total.

+2
Answers (1)
  1. 22 September, 13:31
    0
    Int k=0. total=0;

    while (k++<50)

    total+=k*k;
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Use the variables k and total to write a while loop that computes the sum of the squares of the first 50 counting numbers, and associates ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers