#include<stdio.h>
#include<conio.h>
void main()
{
int n,i,a,b,s;
puts("Enter the terms");
scanf("%d",&n);
puts("Enter the first term");
scanf("%d",&a);
puts("Enter the second term");
scanf("%d",&b);
printf("\n%d\n%d\n",a,b);
for(i=0;i<n-2;i++)
{
s=a+b;
printf("%d\n",s);
a=b;
b=s;
}
}
Comments
Post a Comment