Write a C Program to calculate 1+2+….n sum of series.
#include<stdio.h> void main() { int n,i,sum=0; printf(“Enter the max values of series: “); scanf(“%d”,&n); sum = (n * (n + 1)) / 2; printf(“Sum of… Read More »Write a C Program to calculate 1+2+….n sum of series.