1.

Write a program to find fibonacci series of n is lessthan or equal to 1000 numbers

Answer» INCLUDE int main() { int i, n, T1 = 0, t2 = 1, nextTerm; printf("Enter the NUMBER of TERMS: "); scanf("%d", &n); printf("Fibonacci Series: "); for (i = 1; i <= n; ++i) { printf("%d, ", t1); nextTerm = t1 + t2; t1 = t2; t2 = nextTerm; } RETURN 0;


Discussion

No Comment Found