Write a program that uses a function to calculate the sum of all numbers from 1 to n then prints the result to the screen. The name of the function should be: sum. e.g. if n=5 then sum= 1+2+3+4+5
I wouldn't really bother looking at JLBorges's example. He posted something that he probably knew would be way out of your current level of skill. Pretty much everyone who knows the language considers templates to be advanced C++. >:/
Sorry, Albatross, but i didn't even read anything from it, not even a line of code, so I tought it was the random student (Well, it actually IS a student) and just tought: "You should have listened to your teacher"...