Tuesday
April 21, 2015

Homework Help: Programming

Posted by Annabelle on Tuesday, April 29, 2014 at 10:55pm.

Write a function that takes one positive integer value (call it n) as a parameter and produces the sum of the integers between 1 and n.

Hint: The sum of the integers from 1 to n is n*(n+1) all over 2

I know this is how the function should look but I am unsure of how to write the actual code!

(n*(n+1))/2

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Members