2 Replies - 1152 Views - Last Post: 22 January 2007 - 02:36 PM Rate Topic: -----

#1 nmarcio  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 22-January 07

How to sum of square intergers?

Posted 22 January 2007 - 01:44 PM

:huh: I'm currently taking data structures but I got no clue about my homework, so if anyone would very kind to show me or explained this question:

Write a function that has a loop, which will sum up the squares of the integers 1 to n. What is the order of your function?.

Thanks!!!!
Is This A Good Question/Topic? 0
  • +

Replies To: How to sum of square intergers?

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 247
  • View blog
  • Posts: 13,505
  • Joined: 12-July 02

Re: How to sum of square intergers?

Posted 22 January 2007 - 02:32 PM

Please post the code you have written so far. Our members would be pleased to provide some guidance.
Was This Post Helpful? 0
  • +
  • -

#3 PennyBoki  Icon User is offline

  • system("revolution");
  • member icon

Reputation: 53
  • View blog
  • Posts: 2,334
  • Joined: 11-December 06

Re: How to sum of square intergers?

Posted 22 January 2007 - 02:36 PM

1*1 + 2*2 + 3*3 + ... + n*n
do this with for loop
and the order thing i think it's the big O
check this:
http://www.dreaminco...wtopic23087.htm
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1