Computer Science, asked by uahmed, 7 months ago

Write a C program that generates the following series.
1, -23, -45, -67, -89, -10

Answers

Answered by ariannawhack2
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