Home>

### i get an error in the fibonacci sequence

conditions

f (0) = 3,
f (1) = 0,
f (2) = 2,
f (n) = f (n-2) + f (n-3)
When the Fibonacci sequence represented by is repeated from n = 1,
I want to know the value of h (32) when n that f (n) is divisible by n is k from the smallest and that value is h (k).

Operation result

I created the following source code, but it doesn't work.
I prepared a counter variable c, called the function fibo 10000 times, and created it so that it would exit the loop at c = 32.

Corresponding source code
``````#include<stdio.h>
#define N 10000
int fibo (int n) {
If (n == 0) return 3;
If (n == 1) return 0;
if (n == 2) return 2;
If (n>= 2) {
Return fibo (n-2) + fibo (n-3);
}
}
int main (void) {
Int k, num, cnt = 0;
while (cnt<= 32) {
for (num = 1;num<N;num ++) {
K = fibo (num);
if (k% num == 0) {
cnt ++;
}
}
}
printf ("% d", k);
Return (0);
}``````
The problem i am having
``````report-2-1.c: In function'fibo':
report-2-1.c: 5: 1: error: stray'\ 343' in program
5 | f (n == 0) return 3;
| ^
report-2-1.c: 5: 2: error: stray'\ 200' in program
5 | mf (n == 0) return 3;
| ^
report-2-1.c: 5: 3: error: stray'\ 200' in program
5 | 01;31mmif (n == 0) return 3;
| ^
report-2-1.c: 5:12: error: stray'\ 343' in program
5 | f (n == 0) return 3;
| ^
report-2-1.c: 5:13: error: stray'\ 200' in program
5 | f (n == 0) return 3;
| ^
report-2-1.c: 5:14: error: stray'\ 200' in program
5 | f (n == 0) 01;31mm return 3;
| ^
report-2-1.c: 6: 1: error: stray'\ 343' in program
6 | f (n == 1) return 0;
| ^
report-2-1.c: 6: 2: error: stray'\ 200' in program
6 | mf (n == 1) return 0;
| ^
report-2-1.c: 6: 3: error: stray'\ 200' in program
6 | 01;31mmif (n == 1) return 0;
| ^
report-2-1.c: 6:12: error: stray'\ 343' in program
6 | f (n == 1) return 0;
| ^
report-2-1.c: 6:13: error: stray'\ 200' in program
6 | f (n == 1) return 0;
| ^
report-2-1.c: 6:14: error: stray'\ 200' in program
6 | f (n == 1) 01;31mm return 0;
| ^
report-2-1.c: 8: 1: error: stray'\ 343' in program
8 | f (n>= 2) {^
report-2-1.c: 8: 2: error: stray'\ 200' in program
8 | mf (n>= 2) {^
report-2-1.c: 8: 3: error: stray'\ 200' in program
8 | 01;31mmif (n>= 2) {^
report-2-1.c: 8:13: error: stray'\ 343' in program
8 | f (n>= 2) {^
report-2-1.c: 8:14: error: stray'\ 200' in program
8 | f (n>= 2) {m ^
report-2-1.c: 8:15: error: stray'\ 200' in program
8 | f (n>= 2) {01;31mm
| ^
report-2-1.c: 9: 1: error: stray'\ 343' in program
9 | eturn fibo (n-2) + fibo (n-3);
| ^
report-2-1.c: 9: 2: error: stray'\ 200' in program
9 | meturn fibo (n-2) + fibo (n-3);
| ^
report-2-1.c: 9: 3: error: stray'\ 200' in program
9 | 01;31mmeturn fibo (n-2) + fibo (n-3);
| ^
report-2-1.c: 9: 4: error: stray'\ 343' in program
9 | 01;31meturn fibo (n-2) + fibo (n-3);
| ^
report-2-1.c: 9: 5: error: stray'\ 200' in program
9 | 01;31mmeturn fibo (n-2) + fibo (n-3);
| ^
report-2-1.c: 9: 6: error: stray'\ 200' in program
9 | 01;31mmreturn fibo (n-2) + fibo (n-3);
| ^
report-2-1.c: 10: 1: error: stray'\ 343' in program
10 |
| ^
report-2-1.c: 10: 2: error: stray'\ 200' in program
10 | m
| ^
report-2-1.c: 10: 3: error: stray'\ 200' in program
10 | 01;31mm}
| ^
report-2-1.c: In function'main':
report-2-1.c: 14: 1: error: stray'\ 343' in program
14 | nt k, num, cnt = 0;
| ^
report-2-1.c: 14: 2: error: stray'\ 200' in program
14 | mnt k, num, cnt = 0;
| ^
report-2-1.c: 14: 3: error: stray'\ 200' in program
14 | 01;31mmint k, num, cnt = 0;
| ^
report-2-1.c: 17: 1: error: stray'\ 343' in program
17 | = fibo (num);
| ^
report-2-1.c: 17: 2: error: stray'\ 200' in program
17 | m = fibo (num);
| ^
report-2-1.c: 17: 3: error: stray'\ 200' in program
17 | 01;31mmk = fibo (num);
| ^
report-2-1.c: 24: 1: error: stray'\ 343' in program
24 | eturn (0);
| ^
report-2-1.c: 24: 2: error: stray'\ 200' in program
24 | meturn (0);
| ^
report-2-1.c: 24: 3: error: stray'\ 200' in program
24 | 01;31mmreturn (0);
| ^``````

The error message starting with "stray" is due to the inclusion of double-byte spaces.
Use the replace function of the editor to remove double-byte spaces.

Note: You'll probably then write a comment that means "I'm getting no more errors, but the program doesn't exit and I can't get an answer", but that's a different question than this one. Please write anew as. There is also a problem with the program that removes double-byte spaces.

A compile error has occurred because there are double-byte spaces.

``````/ * Here */if (n == 0)/* Here */return 3;
/ * Here */if (n == 1)/* Here */return 0;
/ * Here */if (n>= 2) {
/ * Here */return fibo (n-2) + fibo (n-3);
/*here*/}
/ * Here */int k, num, cnt = 0;
/ * Here */k = fibo (num);``````