Xavier Math


Finding series is a difficult task in Maths. Xavier is given a homework to obtain the sum value for the following series. Your task is to write a code to find the sum of the following series 1 + 2 + . + n Input: Input should contain the value of the limit n Output: It should print the Sum of series upto n limit

Program :

#include <stdio.h>

int main()


    int n, i, sum = 0;


    for(i=1; i < n; i++)




        sum += i;



 return 0;