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
Where we use clrscr in c?
How can you call a function, given its name as a string?
What is s in c?
Write a program to reverse a given number in c?
write a program to concatenation the string using switch case?
What is extern storage class in c?
How do we open a binary file in Read/Write mode in C?
Explain how do you sort filenames in a directory?
Write a program to check armstrong number in c?
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.
Why & is used in c?
Which is better malloc or calloc?
Which is more efficient, a switch statement or an if else chain?
What is || operator and how does it function in a program?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1