+ 1

How to create a prograam to find a word is in febonici sequence or not

C LANGUAGE USING DO WHILE LOOP

3rd Sep 2017, 4:14 PM
Archit
Archit - avatar
1 Resposta
0
If by word you mean number, then : int is_in_fibo(unsigned n){ unsigned i = 1, j = 1; do j = (i+=j) - j; while(n < j); return n == j; }
3rd Sep 2017, 4:43 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar