#include <stdio.h>
#include <conio.h>
void main()
{
int limit=0, a=1, b=1, c=0, i=0;
printf("enter the limit ");
scanf("%d",&limit);
printf("%d %d ",a,b);
while(i<(limit-2)) // loop executes 2 times less because 2 nos a& b printed already
{
c=a+b;
printf("%d ",c);
a=b; //change to values to move forward
b=c;
i++;
}
}