You are viewing a single comment's thread. Return to all comments →
int main() { int i=2,x,y,n; int z,a[100]={0}; scanf("%d %d %d",&x,&y,&n);
while(i<n)
{ z=0; z=x+pow(y,2); x=y; y=z; i++; a[z]+=z; } printf("%d",a[z]); return 0; }
this my code it is displaying segementation error can anyone help me in getting the actual bug in this code
Seems like cookies are disabled on this browser, please enable them to open this website
Fibonacci Modified
You are viewing a single comment's thread. Return to all comments →
include
include
include
include
int main() { int i=2,x,y,n; int z,a[100]={0}; scanf("%d %d %d",&x,&y,&n);
{ z=0; z=x+pow(y,2); x=y; y=z; i++; a[z]+=z; }
printf("%d",a[z]); return 0; }
this my code it is displaying segementation error can anyone help me in getting the actual bug in this code