/* Sum of 1 + 2 +.....+ n series */ #includeNote: Click on copy button to copy the given code and you can paste it in any online compiler to see the result, IF YOU ARE A MOBILE USER THEN DOWNLOAD "CODING C"(Free App) COMPILER FROM GOOGLE PLAY STORE.main() { int n,i; int sum=0; printf("Enter the n i.e. max values of series: "); scanf("%d",&n); sum = (n * (n + 1)) / 2; printf("Sum of the series: "); for(i =1;i <= n;i++){ if (i!=n) printf("%d + ",i); else printf("%d = %d ",i,sum); } }