> Design a program Fibonacci where user inputs an integer value and the program generates the Fibonacci series from 1 to t

Design a program Fibonacci where user inputs an integer value and the program generates the Fibonacci series from 1 to t

Posted at: 2014-12-18 
include

void fibnocci(int);

void main()

{

int limit;

printf("enter the limit:\n");

scanf("%d",&limit);

fibnocci(limit);

}

void fibnocci(int limit)

{

int a = 1;

int b = 1;int c = 0;

printf("the fibnocci series is:\n");

printf("%d %d ",a,b);

while(c
{

c = a + b;

a = b;

b = c;

if(c>limit)

{

break;

}

printf("%d ",c);

}

getch();

}