Contact Learn C
Copy

Program 341 : Sum Series (1+(1+2)+(1+2+3)+(1+2+3+4)+......till N)

Program 341 : Sum Series (1+(1+2)+(1+2+3)+(1+2+3+4)+......till N)
 
#include<stdio.h>
main()
{
 int i,j,terms,sum=0;
 printf("Enter number oof Terms\n");
 scanf("%d",&terms);
 for(i=1;i<=terms;i++)
 {
  for(j=1;j<=i;j++)
  {
   sum+=j;
  }
 }
 
 printf("Sum of Series : %d\n",sum);
}
Explanation:
//Coming Soon

Output: 

Sum Series (1+(1+2)+(1+2+3)+(1+2+3+4)+......till N)





 
Donate

Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide