#include<stdio.h>
int main()
{
int i,n;
printf("Enter Series Number : ");
scanf("%d",&n);
int anik[n];
anik[0] = 0;
anik[1] = 1;
for(i=2;i<n;i++)
{
anik[i] = anik[i-1] + anik[i-2];
}
printf("\n");
for(i=0;i<n;i++)
{
printf("%d ",anik[i]);
}
return 0;
}
int main()
{
int i,n;
printf("Enter Series Number : ");
scanf("%d",&n);
int anik[n];
anik[0] = 0;
anik[1] = 1;
for(i=2;i<n;i++)
{
anik[i] = anik[i-1] + anik[i-2];
}
printf("\n");
for(i=0;i<n;i++)
{
printf("%d ",anik[i]);
}
return 0;
}
Comments
Post a Comment