solving C++ problem

i encounter problems in doing this program,,can anybody help me? plzzz..
this is the problem..im just only a beginner and my professor is giving us confusing C++ problems..

Write a C++ program that will read in a number N and then output the sum of the squares of the numbers from 1 to N.

plsss help me..
Write some code and we will help you if you have problems with that but we won't do your homework

http://www.cplusplus.com/forum/articles/1295/
First of all this is not a hard problem. Maybe a tad confusing but..

Here is how I would start:

- Get N from the user
- Run a for loop from i = 1 to N
- Inside the loop add i^2 to a total variable
- Output the total variable
Topic archived. No new replies allowed.