c program to find the sum of first n natural numbers using function