Write a C program that generates the following series.
1, -23, -45, -67, -89, -10
Answers
Answered by
0
Answer:
int main()
{
int a=1,b=3,c=4,d,i,n;
scanf("%d",&n);
printf("%d %d %d ",a,b,c);
for(i=4;i<=n;i++)
{
d=a+b+c;
printf("%d ",d);
a=b;
b=c;
c=d;
}
return(0);
}
Similar questions
Math,
3 months ago
Social Sciences,
3 months ago
Chemistry,
7 months ago
Political Science,
7 months ago
Math,
11 months ago
English,
11 months ago