Write a program for the following series:
1*3*5-2*4*6+3*5*7-4*6*8+.................up to nterms

Answer Posted / guest

#include<iosteram.h>
#include<conio.h>
int seri(int)
{
int r,s;
r=s*m+var;
return r;
}
void main()
{
int a[20],b[20];
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>a[i];
int var=-1;
m=a[i];
cout<<m;
getch();
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where we use clrscr in c?

704


How can you call a function, given its name as a string?

712


What is s in c?

613


Write a program to reverse a given number in c?

599


write a program to concatenation the string using switch case?

1558






What is extern storage class in c?

509


How do we open a binary file in Read/Write mode in C?

679


Explain how do you sort filenames in a directory?

603


Write a program to check armstrong number in c?

635


Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.

3690


Why & is used in c?

712


Which is better malloc or calloc?

649


Which is more efficient, a switch statement or an if else chain?

580


What is || operator and how does it function in a program?

625


write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1

3290