Question: Envision an algorithm that when given any positive integer n, it will print out the sum of the squares from 1 to n. E.g. given
Envision an algorithm that when given any positive integer n, it will print out the sum of the squares from 1 to n.
E.g. given 4 the algorithm would print 30 (because 1 + 4 + 9 + 16 = 30) You can use multiplication denoted as * in your solution and you do not have to define it (e.g. 2*2=4)
Write pseudocode for this algorithm using iteration (looping).Step by Step Solution
3.46 Rating (146 Votes )
There are 3 Steps involved in it
To write a pseudocode for an algorithm that calculates the sum of squares from 1 to n we will use a ... View full answer
Get step-by-step solutions from verified subject matter experts
