Computer Science, asked by Suryanshsingh200518, 11 months ago

Write a program to claculate the following series:
1•s=a/2+a/5+a/8+........n terms
2•s=1+3+5+7+..... n terms​

Answers

Answered by Akshat1417
1

Answer:

1:

psvm( int a,int n)

{

int x,s=0,t=0;

for (x=2;x<=n;x+=3)

{

t=a/x;

s+=t;

}

}

2;

psvm(int n)

{

int x,s=0;

for(x=1;x<=n;x+=2)

{

s+= x;

}

}

Similar questions