46. Series 4

Image result for c programming
Code:
  #include<stdio.h>
int main()
{
  int n,i,j=6,sum=5;
  scanf("%d",&n);
  for (i=1;i<=n;i++)
  {
  printf("%d ",j);
  j=j+sum;
    sum=sum+5;
 
  }
  return 0;
}

No comments