criyle/codenet-compile-errors huggingface dataset:
Language: C

#include<stdio.h>

main(){
 
  int i,n;
  int f[100];
  
  scanf("%d",&n)
  f[0]=1;
  f[1]=1;
 
  for(i = 2;i <= n;i++){
    fi[i]=fi[i-1]+fi[i-2];
  }
  printf("%d\n",fi[n]);
  return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:8:17: error: expected ';' before 'f'
    8 |   scanf("%d",&n)
      |                 ^
      |                 ;
    9 |   f[0]=1;
      |   ~              
main.c:13:5: error: 'fi' undeclared (first use in this function); did you mean 'f'?
   13 |     fi[i]=fi[i-1]+fi[i-2];
      |     ^~
      |     f
main.c:13:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int num[50];

fibonacci(int n){
    int i,sum = 0;
    int num[50];
    num[0]= 1;
    num[1] = 1;
    if(n==0)return 1;
   else if(n==1)return 1;
   else if(n => 2){
     for(i = 2;i<=n; i++)
     num[i] = num[i-1]+num[i-2];
    return num[n];
    }
    else return 0;
}main(){
 
  int i;
  scanf("%d",&i);
    printf("%d\n",fibonacci(i));
    return 0;
    }
  

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | fibonacci(int n){
      | ^~~~~~~~~
main.c: In function 'fibonacci':
main.c:11:15: error: expected expression before '>' token
   11 |    else if(n => 2){
      |               ^
main.c: At top level:
main.c:17:2: error: return type defaults to 'int' [-Wimplicit-int]
   17 | }main(){
      |  ^~~~
Language: C

#include <stdio.h>

int fib(int);
int num[45];
  
int main(void){
  int n;
  
  scanf("%d" ,&n);
  printf("%d\n" ,answer(n));
  return 0;
}
  
int fib(int n){

  if(num[n] > 0)return num[n];
  if(n <= 1)return 1;
  else return fib[n] = fib(n-1) + fib(n-2);
  
}

Compiler output:
main.c: In function 'main':
main.c:10:18: error: implicit declaration of function 'answer' [-Wimplicit-function-declaration]
   10 |   printf("%d\n" ,answer(n));
      |                  ^~~~~~
main.c: In function 'fib':
main.c:18:18: error: subscripted value is neither array nor pointer nor vector
   18 |   else return fib[n] = fib(n-1) + fib(n-2);
      |                  ^
Language: C

#include <stdio.h>

int fib(int);
int num[45];
  
int main(void){
  int n;
  
  scanf("%d" ,&n);
  printf("%d\n" ,fib(n));
  return 0;
}
  
int fib(int n){

  if(num[n] > 0)return num[n];
  if(n <= 1)return 1;
  else{
    fib[n] = fib(n-1) + fib(n-2);
    return fib[n];
      }
  
}

Compiler output:
main.c: In function 'fib':
main.c:19:8: error: subscripted value is neither array nor pointer nor vector
   19 |     fib[n] = fib(n-1) + fib(n-2);
      |        ^
main.c:20:15: error: subscripted value is neither array nor pointer nor vector
   20 |     return fib[n];
      |               ^
Language: C

#Include <stdio.h>

int fib(int);
int num[45];
  
int main(void){
  int n;
  
  scanf("%d" ,&n);
  printf("%d\n" ,fib(n));
  return 0;
}
  
int fib(int n){

  if(num[n] > 0)return num[n];
  if(n <= 1)return 1;
  else{
    num[n] = fib(n-1) + fib(n-2);
    return num[n];
      }
  
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #Include; did you mean #include?
    1 | #Include <stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:9:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    9 |   scanf("%d" ,&n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #Include <stdio.h>
main.c:9:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    9 |   scanf("%d" ,&n);
      |   ^~~~~
main.c:9:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   10 |   printf("%d\n" ,fib(n));
      |   ^~~~~~
main.c:10:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:10:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
 int dp[50];

int fibonacci( int n ){
  if ( n == 0 || n == 1)return dp[n] =1;
  if ( dp[n] != -1 )return dp[n];
  return dp[n] = fibonacci( n - 1 ) = fibonacci( n - 2 )//?????°
}

int main(){
  int n,i;
  for( i = 0 ; i < 44 ; i++)dp[i] = -1;

  scanf("%d",&n);
  printf("%d\n",fibonacci(n));

  return 0;
}

Compiler output:
main.c: In function 'fibonacci':
main.c:7:37: error: lvalue required as left operand of assignment
    7 |   return dp[n] = fibonacci( n - 1 ) = fibonacci( n - 2 )//?????°
      |                                     ^
main.c:7:57: error: expected ';' before '}' token
    7 |   return dp[n] = fibonacci( n - 1 ) = fibonacci( n - 2 )//?????°
      |                                                         ^
      |                                                         ;
    8 | }
      | ~
Language: C

#include<stdio.h>
 int dp[50];

int fibonacci( int n ){
  if ( n == 0 || n == 1)return dp[n] =1;
  if ( dp[n] != -1 )return dp[n];
  return dp[n] = fibonacci( n - 1 ) + fibonacci( n - 2 );//?????°
}

int main(){
  int n,i;
  for( i = 0 ; i < =44 ; i++)dp[i] = -1;

  scanf("%d",&n);
  printf("%d\n",fibonacci(n));

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:20: error: expected expression before '=' token
   12 |   for( i = 0 ; i < =44 ; i++)dp[i] = -1;
      |                    ^
Language: C

arr = Array.new(45,0)
def fib(n,arr)
  if(arr[n]>0)
    ret=arr[n]
  elsif(n < 2)
    ret=1
  else
    ret=fib(n-2,arr)+fib(n-1,arr)
  end
  arr[n]=ret
end

n = STDIN.gets.split[0].to_i
puts fib(n,arr)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | arr = Array.new(45,0)
      | ^~~
main.c:1:1: error: type defaults to 'int' in declaration of 'arr' [-Wimplicit-int]
main.c:1:7: error: 'Array' undeclared here (not in a function)
    1 | arr = Array.new(45,0)
      |       ^~~~~
main.c:2:1: error: expected ',' or ';' before 'def'
    2 | def fib(n,arr)
      | ^~~
Language: C

#include<stdio.h>
#include<math.h>

int main(void)
{
int i, n, a;

printf("?????°?????\?????????????????????\n");
scanf("%d", &a);

if(n==0 || n==1)
   return 1;
else
   fib_n=fib_n-1+fib_n-2;

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:4: error: 'fib_n' undeclared (first use in this function)
   14 |    fib_n=fib_n-1+fib_n-2;
      |    ^~~~~
main.c:14:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<math.h>

int main(void)
{
#define fib_n=0;
int i, n, a;

printf("?????°?????\?????????????????????\n");
scanf("%d", &a);

if(n==0 || n==1)
   return 1;
else
   fib_n=fib_n-1+fib_n-2;

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: warning: ISO C99 requires whitespace after the macro name
    6 | #define fib_n=0;
      |         ^~~~~
main.c:6:14: error: expected expression before '=' token
    6 | #define fib_n=0;
      |              ^
main.c:15:4: note: in expansion of macro 'fib_n'
   15 |    fib_n=fib_n-1+fib_n-2;
      |    ^~~~~
main.c:15:9: error: expected expression before '=' token
   15 |    fib_n=fib_n-1+fib_n-2;
      |         ^
main.c:6:14: error: expected expression before '=' token
    6 | #define fib_n=0;
      |              ^
main.c:15:18: note: in expansion of macro 'fib_n'
   15 |    fib_n=fib_n-1+fib_n-2;
      |                  ^~~~~
Language: C

#include<stdio.h>
#define MAX 50
int fibonacci(int);
int F[MAX];
int main(){
  int n,sum;
  for(i=0;i<50;i++)F[i] = -1;
  scanf("%d",&n);
  sum  = fibonacci(n);

  printf("%d\n",sum);

  return 0;
}

int fibonacci(int n){
  if(n == 0 || n == 1)return F[n] = 1;
  if(F[n] != -1)return F[n];
  else return F[n] = fibonacci(n-2)+fibonacci(n-1);
}

Compiler output:
main.c: In function 'main':
main.c:7:7: error: 'i' undeclared (first use in this function)
    7 |   for(i=0;i<50;i++)F[i] = -1;
      |       ^
main.c:7:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

include<stdio.h>
int main(){

  int n,f[44];

  scanf("%d",&n);

  f[0]=1;
  f[1]=1;

  for(i=2;i<n+2;i++){
    f[i]=f[i-2]+f[i-1];
  }


  printf("%d",f[n]);
   


return 0

}
  

    /*
makeFibonacci()
    F[0] = 1
    F[1] = 1
    for i が 2 から N まで
        F[i] = F[i-2] + F[i-1]

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c:25:5: error: unterminated comment
   25 |     /*
      |     ^
Language: C

include<stdio.h>
int main(){

  int n,f[44];

  scanf("%d",&n);

  f[0]=1;
  f[1]=1;

  for(i=2;i<n+2;i++){
    f[i]=f[i-2]+f[i-1];
  }


  printf("%d",f[n]);
   


return 0

}
  

   

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

include<stdio.h>
int main(){

  int n,f[44];

  scanf("%d",&n);

  f[0]=1;
  f[1]=1;

  for(i=2;i<n+2;i++){
    f[i]=f[i-2]+f[i-1];
  }


  printf("%d",f[n]);
   


return 0 ;

}
  

   

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

include<stdio.h>
int main(){

  int n,f[44];

  scanf("%d",&n);

  f[0]=1;
  f[1]=1;

  for(i=2;i<n+2;i++){
    f[i]=f[i-2]+f[i-1];
  }


  printf("%d",f[n]);
   


return 0;

}
  

   

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

#include<stdio.h>
int main(){

  int n,f[44];

  scanf("%d",&n);

  f[0]=1;
  f[1]=1;

  for(i=2;i<n+2;i++){
    f[i]=f[i-2]+f[i-1];
  }


  printf("%d",f[n]);
   


return 0;

}
  

   

Compiler output:
main.c: In function 'main':
main.c:11:7: error: 'i' undeclared (first use in this function)
   11 |   for(i=2;i<n+2;i++){
      |       ^
main.c:11:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int F[45];
int Fi(int num){
  if(num < 2){
    return (1);
  }
  else if(0 < F[n]){
    return(F[n]);
}
  F[n] = Fi(n - 1) + Fi(n - 2);
  return(F[n]);
    }
int main(){
  int length;
  scanf("%d",&length);
  printf("%d\n",Fi(length));
  return 0;
}

Compiler output:
main.c: In function 'Fi':
main.c:7:17: error: 'n' undeclared (first use in this function)
    7 |   else if(0 < F[n]){
      |                 ^
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int F[45];
int Fi(int num){
  if(num < 2){
    return (1);
  }
  else if(0 < F[n]){
    return F[n];
}
  F[n] = Fi(n - 1) + Fi(n - 2);
  return F[n];
    }
int main(){
  int length;
  scanf("%d",&length);
  printf("%d\n",Fi(length));
  return 0;
}

Compiler output:
main.c: In function 'Fi':
main.c:7:17: error: 'n' undeclared (first use in this function)
    7 |   else if(0 < F[n]){
      |                 ^
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

rp[50];

int main(){

int i,num;

for(i=0; i<50; i++) rp[i] = -1;

scanf("%d",&num);
printf("%d\n",fibonatch(num));

retur 0;
}

fibonatch(int num){
if(n==0||n==1) return rp[num]=1;
if(rp[num]!=-1) return rp[num];
return rp[num] = fibonatch(num-1)+fibonatch(num-2);
}

Compiler output:
main.c:3:1: warning: data definition has no type or storage class
    3 | rp[50];
      | ^~
main.c:3:1: error: type defaults to 'int' in declaration of 'rp' [-Wimplicit-int]
main.c: In function 'main':
main.c:12:15: error: implicit declaration of function 'fibonatch' [-Wimplicit-function-declaration]
   12 | printf("%d\n",fibonatch(num));
      |               ^~~~~~~~~
main.c:14:1: error: 'retur' undeclared (first use in this function)
   14 | retur 0;
      | ^~~~~
main.c:14:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:6: error: expected ';' before numeric constant
   14 | retur 0;
      |      ^~
      |      ;
main.c: At top level:
main.c:17:1: error: return type defaults to 'int' [-Wimplicit-int]
   17 | fibonatch(int num){
      | ^~~~~~~~~
main.c: In function 'fibonatch':
main.c:18:4: error: 'n' undeclared (first use in this function)
   18 | if(n==0||n==1) return rp[num]=1;
      |    ^
Language: C

#include<stdio.h>

rp[50];

int main(){

int i,num;

for(i=0; i<50; i++) rp[i] = -1;

scanf("%d",&num);
printf("%d\n",fibonatch(num));

return 0;
}

fibonatch(int num){
if(n==0||n==1) return rp[num]=1;
if(rp[num]!=-1) return rp[num];
return rp[num] = fibonatch(num-1)+fibonatch(num-2);
}

Compiler output:
main.c:3:1: warning: data definition has no type or storage class
    3 | rp[50];
      | ^~
main.c:3:1: error: type defaults to 'int' in declaration of 'rp' [-Wimplicit-int]
main.c: In function 'main':
main.c:12:15: error: implicit declaration of function 'fibonatch' [-Wimplicit-function-declaration]
   12 | printf("%d\n",fibonatch(num));
      |               ^~~~~~~~~
main.c: At top level:
main.c:17:1: error: return type defaults to 'int' [-Wimplicit-int]
   17 | fibonatch(int num){
      | ^~~~~~~~~
main.c: In function 'fibonatch':
main.c:18:4: error: 'n' undeclared (first use in this function)
   18 | if(n==0||n==1) return rp[num]=1;
      |    ^
main.c:18:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int fibonatch(int);

rp[50];

int main(){

int i,num;

for(i=0; i<50; i++) rp[i] = -1;

scanf("%d",&num);
printf("%d\n",fibonatch(num));

return 0;
}

fibonatch(int num){
if(n==0||n==1) return rp[num]=1;
if(rp[num]!=-1) return rp[num];
return rp[num] = fibonatch(num-1)+fibonatch(num-2);
}

Compiler output:
main.c:5:1: warning: data definition has no type or storage class
    5 | rp[50];
      | ^~
main.c:5:1: error: type defaults to 'int' in declaration of 'rp' [-Wimplicit-int]
main.c:19:1: error: return type defaults to 'int' [-Wimplicit-int]
   19 | fibonatch(int num){
      | ^~~~~~~~~
main.c: In function 'fibonatch':
main.c:20:4: error: 'n' undeclared (first use in this function)
   20 | if(n==0||n==1) return rp[num]=1;
      |    ^
main.c:20:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int fibonatch(int);

rp[50];

int main(){

int i,num;

for(i=0; i<50; i++) rp[i] = -1;

scanf("%d",&num);
printf("%d\n",fibonatch(num));

return 0;
}

int fibonatch(int num){
if(n==0||n==1) return rp[num]=1;
if(rp[num]!=-1) return rp[num];
return rp[num] = fibonatch(num-1)+fibonatch(num-2);
}

Compiler output:
main.c:5:1: warning: data definition has no type or storage class
    5 | rp[50];
      | ^~
main.c:5:1: error: type defaults to 'int' in declaration of 'rp' [-Wimplicit-int]
main.c: In function 'fibonatch':
main.c:20:4: error: 'n' undeclared (first use in this function)
   20 | if(n==0||n==1) return rp[num]=1;
      |    ^
main.c:20:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int fibonatch(int);

int rp[50];

int main(){

int i,num;

for(i=0; i<50; i++) rp[i] = -1;

scanf("%d",&num);
printf("%d\n",fibonatch(num));

return 0;
}

int fibonatch(int num){
if(n==0||n==1) return rp[num]=1;
if(rp[num]!=-1) return rp[num];
return rp[num] = fibonatch(num-1)+fibonatch(num-2);
}

Compiler output:
main.c: In function 'fibonatch':
main.c:20:4: error: 'n' undeclared (first use in this function)
   20 | if(n==0||n==1) return rp[num]=1;
      |    ^
main.c:20:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

{
  int i;

  F[0] = 1;
  F[1] = 1;

  for(i=2;i<=n;i++){
    F[i] = F[i-2] + F[i-1];
  }
  return F[n];

}

Compiler output:
main.c:1:1: error: expected identifier or '(' before '{' token
    1 | {
      | ^
Language: C

#include "stdafx.h"
#include<stdio.h>
#define N 500000
#define INFTY (1<<30)

int dp[50];

int fib(int n){
	if (n == 0 || n == 1) return dp[n] = 1;
	if (dp[n] != -1) return dp[n];

	return dp[n] = fib(n - 1) + fib(n - 2);
}




int main(){

	int i;
	int n;

	for (i = 0; i < 50; i++) dp[i] = -1;

	scanf_s("%d", &n);
	printf("%d", fib(n));

	return 0;

}

Compiler output:
main.c:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C


#include<stdio.h>
#define N 500000
#define INFTY (1<<30)

int dp[50];

int fib(int n){
	if (n == 0 || n == 1) return dp[n] = 1;
	if (dp[n] != -1) return dp[n];

	return dp[n] = fib(n - 1) + fib(n - 2);
}




int main(){

	int i;
	int n;

	for (i = 0; i < 50; i++) dp[i] = -1;

	scanf_s("%d", &n);
	printf("%d", fib(n));

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:25:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   25 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>

int fb[50];

int fib( int n ) {
  if ( n == 1 || n==0 )
    return fb[ n ] = 1;
  if ( fb[ n ] != -1 )
    return fb[ n ];
  return fb[ n ] = fib[ n-1 ] + fib[ n-2 ];
}
int main() {

  int i, n;
  scanf("%d", &n);
  for( i=0; i<n; i++)
    fb[ i ] = -1;
  printf("%d", fib[ n ]);

  return 0;

}
 
  

Compiler output:
main.c: In function 'fib':
main.c:10:23: error: subscripted value is neither array nor pointer nor vector
   10 |   return fb[ n ] = fib[ n-1 ] + fib[ n-2 ];
      |                       ^
main.c:10:36: error: subscripted value is neither array nor pointer nor vector
   10 |   return fb[ n ] = fib[ n-1 ] + fib[ n-2 ];
      |                                    ^
main.c: In function 'main':
main.c:18:19: error: subscripted value is neither array nor pointer nor vector
   18 |   printf("%d", fib[ n ]);
      |                   ^
Language: C

#include<stdio.h>

int main(int args){

int x;

if (x=1 or x=0){
  return 1;
}else{
  return main(x-2)+main(x-1);  
}

}

Compiler output:
main.c: In function 'main':
main.c:7:8: error: expected ')' before 'or'
    7 | if (x=1 or x=0){
      |    ~   ^~~
      |        )
Language: C

#include<stdio.h>

int dp[50]

int fib(int n){
  if (n == 0 || n == 1) return dp[n] =1;
  if(dp[n] ! =-1) return dp[n];
  return dp[n] = fib(n-1) +fib(n-2);
}

int main(){
  int n, i;
  for(i=0;i<50; i++) dp[i]=-1;

  scanf("%d", &n);
  printf("%d?\n", fib(n));

  return0;
}

Compiler output:
main.c:3:11: error: expected ';' before 'int'
    3 | int dp[50]
      |           ^
      |           ;
    4 | 
    5 | int fib(int n){
      | ~~~        
main.c: In function 'fib':
main.c:6:32: error: 'dp' undeclared (first use in this function)
    6 |   if (n == 0 || n == 1) return dp[n] =1;
      |                                ^~
main.c:6:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:11: error: expected ')' before '!' token
    7 |   if(dp[n] ! =-1) return dp[n];
      |     ~     ^~
      |           )
main.c: In function 'main':
main.c:13:22: error: 'dp' undeclared (first use in this function)
   13 |   for(i=0;i<50; i++) dp[i]=-1;
      |                      ^~
main.c:18:3: error: 'return0' undeclared (first use in this function)
   18 |   return0;
      |   ^~~~~~~
Language: C

fibonacci(n)
    if n == 0 || n == 1
    return F[n] = 1 // F[n] ??? 1 ????????¢?????????????????????
    if F[n] ????¨??????????
        return F[n]
    return F[n] = fibonacci(n - 2) + fibonacci(n - 1)

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | fibonacci(n)
      | ^~~~~~~~~
main.c: In function 'fibonacci':
main.c:2:5: error: expected declaration specifiers before 'if'
    2 |     if n == 0 || n == 1
      |     ^~
main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int]
    1 | fibonacci(n)
      | ^~~~~~~~~
Language: C

#include<stdio.h>

int fibonacci(int);
int F[N];
int main(){
  int i,n;
  scanf("%d",&n);
  printf("%d\n",fibonacci(n));
}

int fibonacci(int n){
  int i;
  if(n==0 ||n==1)return 1;
  for(i=2;i<n;i++){
  F[i]=F[i-2]+F[i-1];
  if(i==n) return F[i];
  }
 
}

Compiler output:
main.c:4:7: error: 'N' undeclared here (not in a function)
    4 | int F[N];
      |       ^
Language: C

#include<stdio.h>

int fib(int)

int a[44];

int main(){
int n,i;

for(i=0;i<44;i++)a[i]=-1;

scanf("%d",&n);
printf("%d\n",fib(n));

return 0;
}

int fib(int n){
if(n==0||n==1)return a[n]=1;
if(a[n]!=-1)return a[n];
return a[n]=fib(n-1)+fib(n-2);
}

Compiler output:
main.c: In function 'fib':
main.c:7:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    7 | int main(){
      |           ^
main.c:18:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   18 | int fib(int n){
      |               ^
main.c:3:5: error: old-style parameter declarations in prototyped function definition
    3 | int fib(int)
      |     ^~~
main.c:23: error: expected '{' at end of input
Language: C

#include <stdio.h>

int makeFibonatti( int );
int main()
{
  int n;
  
  scanf("%d", &n);

  printf("%d\n", makeFibonatti(n));
  
  return 0;
}
`
int makeFibonatti(int N)
{
  int F[50];
  int i;
  
  F[0] = 1;
  F[1] = 1;
  for(i = 2; i <= N; i++)
    F[i] = F[i-2]+F[i-1];
  return F[i-1];
}

Compiler output:
main.c:14:1: error: stray '`' in program
   14 | `
      | ^
Language: C

#include <stdio.h>
#define MAX 45
int F[MAX];
int Fibonacci(int n){
    if(n==0||n==1){
        F[n]=1;
        return F[n];
    }
    if(F[n]!=0){
        return F[n];
    }
    return Fibonacci(n-2)+Fibonacci(n-1);
};
int main(){
    int n,ans;
    scanf("%d",&n);
    ans = Fibonacci(n)
    printf("%d\n",ans);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:23: error: expected ';' before 'printf'
   17 |     ans = Fibonacci(n)
      |                       ^
      |                       ;
   18 |     printf("%d\n",ans);
      |     ~~~~~~
Language: C

#include<stdio.h>

int dp[50];

int fib(int n){
  if(n == 0 || n == 1) return dp[n] = 1;
  if(dp[n] != -1) return dp[n];
  return dp[n] = fib(n - 1) + fib(n - 2):
}

int main(){
  int n, i;

  for(i = 0 ; i < 50 ; i++){
    dp[i] = -1;
  }

  scanf("%d",&n);
  printf("%d\n",fib(n));

  return 0;
}

Compiler output:
main.c: In function 'fib':
main.c:8:41: error: expected ';' before ':' token
    8 |   return dp[n] = fib(n - 1) + fib(n - 2):
      |                                         ^
      |                                         ;
Language: C

include <iostream>
using namespace std;
 
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
 
int main(void) {
  int n; cin >> n;
  int dp[n];
  dp[0] = dp[1] = 1;
  FOR(i, 2, n + 1) {
    dp[i] = dp[i - 1] + dp[i - 2];
  }
  cout << dp[n] <<endl;
  return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <iostream>
      |         ^
main.c: In function 'main':
main.c:7:10: error: 'cin' undeclared (first use in this function)
    7 |   int n; cin >> n;
      |          ^~~
main.c:7:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:3: error: 'cout' undeclared (first use in this function)
   13 |   cout << dp[n] <<endl;
      |   ^~~~
main.c:13:19: error: 'endl' undeclared (first use in this function)
   13 |   cout << dp[n] <<endl;
      |                   ^~~~
Language: C

#include <stdio.h>

int Fib(int n){
    if (n == 0 || n == 1) return F[n] = 1; // F[n] ??? 1 ????????¢?????????????????????
    if (F[n] != 0) return F[n];
    return F[n] = fibonacci(n - 2) + fibonacci(n - 1);
}
int main(){
int n,fib;

scanf("%d",&n);
fib=Fib(n);

printf("%d\n",fib);

return 0;
}

Compiler output:
main.c: In function 'Fib':
main.c:4:34: error: 'F' undeclared (first use in this function)
    4 |     if (n == 0 || n == 1) return F[n] = 1; // F[n] ??? 1 ????????¢?????????????????????
      |                                  ^
main.c:4:34: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:19: error: implicit declaration of function 'fibonacci' [-Wimplicit-function-declaration]
    6 |     return F[n] = fibonacci(n - 2) + fibonacci(n - 1);
      |                   ^~~~~~~~~
Language: C

#include <stdio.h>
#define N 44
int Fib(int n){
    int f[N];
    f[0]=1;
    f[1]=1;

    for(i=2;i<n;i++) f[i]=Fib(i-2)+Fib(i-1);
    return f[n]; 
}
int main(){
int n,fib;

scanf("%d",&n);
fib=Fib(n);

printf("%d\n",fib);

return 0;
}

Compiler output:
main.c: In function 'Fib':
main.c:8:9: error: 'i' undeclared (first use in this function)
    8 |     for(i=2;i<n;i++) f[i]=Fib(i-2)+Fib(i-1);
      |         ^
main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#define N 45

int A[N],x;

void fibonacci(){
int i;
A[0]=1;
A[1]=1;

for(i=2;i<=x;i++){
A[n] = A[n-2] + A[n-1];
}
}

int main(){

int i,j;

scanf("%d",&x);

fibonacci();

printf("%d\n",A[x]);

return 0;
}

Compiler output:
main.c: In function 'fibonacci':
main.c:12:3: error: 'n' undeclared (first use in this function)
   12 | A[n] = A[n-2] + A[n-1];
      |   ^
main.c:12:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int fib (int);

int main () {
int n;

scanf("%d", &n);
printf("%d\n", fib(n););

return 0;
}

int fib (int n) {

if (n == 0 || n == 1) return 1;
else return fib(n-1) + fib(n-2);

Compiler output:
main.c: In function 'main':
main.c:9:22: error: expected ')' before ';' token
    9 | printf("%d\n", fib(n););
      |       ~              ^
      |                      )
main.c: In function 'fib':
main.c:17:1: error: expected declaration or statement at end of input
   17 | else return fib(n-1) + fib(n-2);
      | ^~~~
Language: C

#include <stdio.h>

int fib (int);

int main () {
int n;

scanf("%d", &n);
printf("%d\n", fib(n));

return 0;
}

int fib (int n) {

if (n == 0 || n == 1) return 1;
else return fib(n-1) + fib(n-2);

Compiler output:
main.c: In function 'fib':
main.c:17:1: error: expected declaration or statement at end of input
   17 | else return fib(n-1) + fib(n-2);
      | ^~~~
Language: C

#include<stdio.h>

int main(){
int i,n,F[50];

F[0]=1;
F[1]=1;

scanf("%d",&n);

for(i=2;i=<n;i++) F[i]=F[i-1]+F[i-2];

printf("%d\n",F[n]);

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:11:11: error: expected expression before '<' token
   11 | for(i=2;i=<n;i++) F[i]=F[i-1]+F[i-2];
      |           ^
Language: C

#include <stdio.h>
#define N 44
int Fib(int n){
    int f[n];
    f[0]=1;
    f[1]=1;

    for(i=2;i<n;i++) f[i]=Fib(i-2)+Fib(i-1);
    return f[n]; 
}
int main(){
int n,fib;

scanf("%d",&n);
fib=Fib(n);

printf("%d\n",fib);

return 0;
}

Compiler output:
main.c: In function 'Fib':
main.c:8:9: error: 'i' undeclared (first use in this function)
    8 |     for(i=2;i<n;i++) f[i]=Fib(i-2)+Fib(i-1);
      |         ^
main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int d[50];

int nach(int i){
if(n==0||n==1)return d[n]=1;
if(d[n]!=-1)return d[n];
return d[n]=nach(n-1)+nach(n-2);
}

int main(){
int n,i;
for(i=0;i<50;i++)d[i]=-1;

scanf("%d",&n);
printf("%d\n",nach(n));

return 0;
}

Compiler output:
main.c: In function 'nach':
main.c:5:4: error: 'n' undeclared (first use in this function)
    5 | if(n==0||n==1)return d[n]=1;
      |    ^
main.c:5:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#define n 44
int main(){
  int f[n],i,f[0]=1,f[1]=1,a=0;
     scanf("%d",&a);
    for(i=2;i<=a;i++){
        f[i]=f[i-1]+f[i-2];
}
printf("%d\n",f[a]);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:14: error: conflicting types for 'f'; have 'int[0]'
    4 |   int f[n],i,f[0]=1,f[1]=1,a=0;
      |              ^
main.c:4:7: note: previous declaration of 'f' with type 'int[44]'
    4 |   int f[n],i,f[0]=1,f[1]=1,a=0;
      |       ^
main.c:4:19: error: invalid initializer
    4 |   int f[n],i,f[0]=1,f[1]=1,a=0;
      |                   ^
main.c:4:21: error: conflicting types for 'f'; have 'int[1]'
    4 |   int f[n],i,f[0]=1,f[1]=1,a=0;
      |                     ^
main.c:4:14: note: previous definition of 'f' with type 'int[0]'
    4 |   int f[n],i,f[0]=1,f[1]=1,a=0;
      |              ^
main.c:4:26: error: invalid initializer
    4 |   int f[n],i,f[0]=1,f[1]=1,a=0;
      |                          ^
Language: C

#include <stdio.h>
int main(){
  int f[44],i,f[0]=1,f[1]=1,a=0;
     scanf("%d",&a);
    for(i=2;i<=a;i++){
        f[i]=f[i-1]+f[i-2];
}
printf("%d\n",f[a]);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:15: error: conflicting types for 'f'; have 'int[0]'
    3 |   int f[44],i,f[0]=1,f[1]=1,a=0;
      |               ^
main.c:3:7: note: previous declaration of 'f' with type 'int[44]'
    3 |   int f[44],i,f[0]=1,f[1]=1,a=0;
      |       ^
main.c:3:20: error: invalid initializer
    3 |   int f[44],i,f[0]=1,f[1]=1,a=0;
      |                    ^
main.c:3:22: error: conflicting types for 'f'; have 'int[1]'
    3 |   int f[44],i,f[0]=1,f[1]=1,a=0;
      |                      ^
main.c:3:15: note: previous definition of 'f' with type 'int[0]'
    3 |   int f[44],i,f[0]=1,f[1]=1,a=0;
      |               ^
main.c:3:27: error: invalid initializer
    3 |   int f[44],i,f[0]=1,f[1]=1,a=0;
      |                           ^
Language: C

#include<stdio.h>

int f[44];

void fib(int n){
  if(n==0){
 f[n]=1;
  }

  else if(n==1){
  f[n]=fib(n-1);
  }

  else if(n>1){
   f[n]=fib(n-2)+fib(n-1);
  }
}

int main(){
  int n;
  scanf("%d",&n);
fib(n);
  printf("%d\n",f[n]);
  return 0;
}

Compiler output:
main.c: In function 'fib':
main.c:11:7: error: void value not ignored as it ought to be
   11 |   f[n]=fib(n-1);
      |       ^
main.c:15:9: error: void value not ignored as it ought to be
   15 |    f[n]=fib(n-2)+fib(n-1);
      |         ^~~~~~~~
main.c:15:18: error: void value not ignored as it ought to be
   15 |    f[n]=fib(n-2)+fib(n-1);
      |                  ^~~~~~~~
Language: C

#include <stdio.h>

int dp[50];

int fib(int i){
  if(n == 0 || n == 1) return dp[n] = 1;
  if(dp[n] != -1) return dp[n];
  return dp[n] = fib(n - 1) + fib(n - 2);
}

int main(){
  int n,i;
  for(i = 0; i<50; i++) dp[i] = -1;

  scanf("%d",&n);
  printf("%d\n",fib(n));

  return 0;
}

Compiler output:
main.c: In function 'fib':
main.c:6:6: error: 'n' undeclared (first use in this function)
    6 |   if(n == 0 || n == 1) return dp[n] = 1;
      |      ^
main.c:6:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#define N 45
??
int main(){
????int i,n;
????int F[N];
??
????scanf("%d",&n);
??
????F[0] = F[1] = 1;
??
????for(i=2;i<=n;i++){
????????F[i] = F[i-1] + F[i-2];
????}
??
????printf("%d\n",F[n]);
??
????return 0;
}

Compiler output:
main.c:3:1: error: expected identifier or '(' before '?' token
    3 | ??
      | ^
Language: C

#include<stdio.h>
 
int F[100];
 
int fibonacci(int n){
  if(n==0 || n==1){
    F[n] = 1;
    return F[n];
  }
  if(F[n] != 0)
    return F[n];
       
  F[n] = fibonacci(n-2) + fibonacci(n-1);
  return F[n];
}
int main(void){
   
  int i,n;
   
  for(i=0;i<100;i++) F[i]=0;
   
  scanf("%d",&n);
   
  printf("%d\n",fibonacci(n));
   
  return 0;

Compiler output:
main.c: In function 'main':
main.c:26:3: error: expected declaration or statement at end of input
   26 |   return 0;
      |   ^~~~~~
Language: C

#include<stdio.h>
 
int F[45] = {};
 
int fib(int n){
  int u, v;
  if(F[n] != 0) return F[n];
  else{ 
    if(n == 0 || n == 1) F[n] = 1;
    else{
      u = fib(n - 1);
      v = fib(n - 2);
      F[n] = u + v;
    }
  }
  return dp[n];
}
 
int main(){
  int n;
  scanf("%d", &n);
  printf("%d\n", fib(n));  
  return 0;
}

Compiler output:
main.c: In function 'fib':
main.c:16:10: error: 'dp' undeclared (first use in this function)
   16 |   return dp[n];
      |          ^~
main.c:16:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C


#include <stdio.h>
#include <stdlib.h>   

int Fibo(int n);
void main(void);


int Fibo(int n)
{
    int f;        

    switch (n) {
        case 1:
        case 2:             
            f = 1L;         
            break;
        default:            /
            f = Fibo(n - 1) + Fibo(n - 2);
            break;
    }
    return (f);             
} 

int main(void)
{
    int n;                  

    scanf("%d", &n);

    if(n > 45) {            
        exit (0);
    }

    printf("%lu\n", Fibo(n));
return(0);
}

Compiler output:
main.c: In function 'Fibo':
main.c:18:29: error: expected expression before '/' token
   18 |         default:            /
      |                             ^
main.c: At top level:
main.c:25:5: error: conflicting types for 'main'; have 'int(void)'
   25 | int main(void)
      |     ^~~~
main.c:6:6: note: previous declaration of 'main' with type 'void(void)'
    6 | void main(void);
      |      ^~~~
Language: C

#include <stdio.h>

int dp[50];

int fib(int n);
  if ( n == 0 || n == 1)
    return dp[n] = 1;
  if ( dp[n] !=  -1)
    return dp[n];
  return dp[n] = fib(n - 1) + fib(n - 2);
}

int main (void)  {
  int n, i;
  for (i = 0; i < 50; i++)  
    dp[i] = -1;
  scanf("%d", &n);
  printf("%d?\n", fib(n));
  
  return 0;
}
  

Compiler output:
main.c:6:3: error: expected identifier or '(' before 'if'
    6 |   if ( n == 0 || n == 1)
      |   ^~
main.c:8:3: error: expected identifier or '(' before 'if'
    8 |   if ( dp[n] !=  -1)
      |   ^~
main.c:10:3: error: expected identifier or '(' before 'return'
   10 |   return dp[n] = fib(n - 1) + fib(n - 2);
      |   ^~~~~~
main.c:11:1: error: expected identifier or '(' before '}' token
   11 | }
      | ^
Language: C

#include<stdio.h>

int main(){

int fib[50];
int i, x;

fib[0] = fib[1] = 1;

for(i = 2; i < 50; i++){
  fib[n] = fib[n-1] + fib[n-2];
}

scanf("%d", &x);
printf("%d\n", fib[x]);

}

Compiler output:
main.c: In function 'main':
main.c:11:7: error: 'n' undeclared (first use in this function)
   11 |   fib[n] = fib[n-1] + fib[n-2];
      |       ^
main.c:11:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){

int fib[50];
int i, x;

fib[0] = fib[1] = 1;

for(i = 2; i < 50; i++){
  fib[n] = fib[n-1] + fib[n-2];
}

scanf("%d", &x);
printf("%d\n", fib[x]);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:7: error: 'n' undeclared (first use in this function)
   11 |   fib[n] = fib[n-1] + fib[n-2];
      |       ^
main.c:11:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main () {
   int a[50] = {0};
   int n, i, j;

   scanf("%d", &n);

   int a[1] = 1;
   int a[2] = 1;

   for(i = 3; i <= n; i++){
      a[i] = a[i-1] + a[i-2];
   }

   printf("%d\n", a[n]);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:8: error: conflicting types for 'a'; have 'int[1]'
    9 |    int a[1] = 1;
      |        ^
main.c:4:8: note: previous definition of 'a' with type 'int[50]'
    4 |    int a[50] = {0};
      |        ^
main.c:9:15: error: invalid initializer
    9 |    int a[1] = 1;
      |               ^
main.c:10:8: error: conflicting types for 'a'; have 'int[2]'
   10 |    int a[2] = 1;
      |        ^
main.c:9:8: note: previous definition of 'a' with type 'int[1]'
    9 |    int a[1] = 1;
      |        ^
main.c:10:15: error: invalid initializer
   10 |    int a[2] = 1;
      |               ^
Language: C

#include <stdio.h>

int fib(int n)
{
 if( n==0 || n==1 ){
  return fib(n)=1;
 }else{
   return fib(n)=fib(n-1)+fib(n-2);
 }

int main(void)
{
 int n,ans;

 scanf("%d",&n);

 printf("%d",fib(n));

 return 0;
}

Compiler output:
main.c: In function 'fib':
main.c:6:16: error: lvalue required as left operand of assignment
    6 |   return fib(n)=1;
      |                ^
main.c:8:17: error: lvalue required as left operand of assignment
    8 |    return fib(n)=fib(n-1)+fib(n-2);
      |                 ^
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
Language: C

#include <stdio.h>

int fib(int n)
{
 if( n==0 || n==1 ){
  return fib(n)=1;
 }else{
   return fib(n)=fib(n-1)+fib(n-2);
 }
}

int main(void)
{
 int n,ans;

 scanf("%d",&n);

 printf("%d",fib(n));

 return 0;
}

Compiler output:
main.c: In function 'fib':
main.c:6:16: error: lvalue required as left operand of assignment
    6 |   return fib(n)=1;
      |                ^
main.c:8:17: error: lvalue required as left operand of assignment
    8 |    return fib(n)=fib(n-1)+fib(n-2);
      |                 ^
Language: C

#include <stdio.h>

void fibonacci(int n){
	if (n == 0 || n == 1) return 1;
	return fibonacci(n - 2) + fibonacci(n - 1);
}

int main(void)
{
	int n;
	
	scanf("%d", &n);
	
	printf("%d\n",fibonacci(n));

	return 0;
}

Compiler output:
main.c: In function 'fibonacci':
main.c:4:38: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    4 |         if (n == 0 || n == 1) return 1;
      |                                      ^
main.c:3:6: note: declared here
    3 | void fibonacci(int n){
      |      ^~~~~~~~~
main.c:5:16: error: void value not ignored as it ought to be
    5 |         return fibonacci(n - 2) + fibonacci(n - 1);
      |                ^~~~~~~~~~~~~~~~
main.c:5:35: error: void value not ignored as it ought to be
    5 |         return fibonacci(n - 2) + fibonacci(n - 1);
      |                                   ^~~~~~~~~~~~~~~~
main.c:5:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    5 |         return fibonacci(n - 2) + fibonacci(n - 1);
      |                ^~~~~~~~~
main.c:3:6: note: declared here
    3 | void fibonacci(int n){
      |      ^~~~~~~~~
main.c: In function 'main':
main.c:14:23: error: invalid use of void expression
   14 |         printf("%d\n",fibonacci(n));
      |                       ^~~~~~~~~~~~
Language: C

#include <stdio.h>

int fib(int n)
{
 if( n==0 || n==1 ){
  fib(n)=1;
  return fib(n);
 }else{
   fib(n)=fib(n-1)+fib(n-2);
   return fib(n);
 }
}

int main(void)
{
 int n;

 scanf("%d",&n);

 printf("%d",fib(n));

 return 0;
}

Compiler output:
main.c: In function 'fib':
main.c:6:9: error: lvalue required as left operand of assignment
    6 |   fib(n)=1;
      |         ^
main.c:9:10: error: lvalue required as left operand of assignment
    9 |    fib(n)=fib(n-1)+fib(n-2);
      |          ^
Language: C

#include<stdio.h>

int F[45];

int fibonacci(int n){
  if(n==0||n==1){
    return F[n]=1;
  }
  if(F[n]!=-1){
    return F[n];
  }
  return F[n]=fibonnacci(n-2)+fibonacci(n-1);
}

int main(void)
{
  int i,n;
  for(i=0;i<45;i++){
    F[i]=-1;
  }
  scanf("%d",&n);
  printf("%d\n",fibonacci(n));
  
  return 0;
}

Compiler output:
main.c: In function 'fibonacci':
main.c:12:15: error: implicit declaration of function 'fibonnacci'; did you mean 'fibonacci'? [-Wimplicit-function-declaration]
   12 |   return F[n]=fibonnacci(n-2)+fibonacci(n-1);
      |               ^~~~~~~~~~
      |               fibonacci
Language: C

#include<stdio.h>

int dp[50];

int fib(int n) {
   if ( n == 0 || n == 1 ) 
      return dp[n] = 1;
   if ( dp[n] != -1 )
      return ddp[n];
   return dp[n] = fib(n - 1) + fib(n - 2);
}

int main() {
   int n, i;
   for ( i = 0; i < 50; i++) 
      dp[i] = -1;

   scanf("%d", &n);
   printf("%d\n", fib(n));

   return 0;
}

Compiler output:
main.c: In function 'fib':
main.c:9:14: error: 'ddp' undeclared (first use in this function); did you mean 'dp'?
    9 |       return ddp[n];
      |              ^~~
      |              dp
main.c:9:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int f(int n)
if(n == 0 || n == 1)
return n;
else return f(n - 2)+f(n - 1);
}

 main(){
int n;
scanf("%d",&n);
if(n >= 0)
printf("f(%d) = %d\n",n,f(n));
}

Compiler output:
main.c: In function 'f':
main.c:3:1: error: expected declaration specifiers before 'if'
    3 | if(n == 0 || n == 1)
      | ^~
main.c:5:1: error: expected declaration specifiers before 'else'
    5 | else return f(n - 2)+f(n - 1);
      | ^~~~
main.c:6:1: error: expected declaration specifiers before '}' token
    6 | }
      | ^
main.c:8:2: error: expected declaration specifiers before 'main'
    8 |  main(){
      |  ^~~~
main.c:14: error: expected '{' at end of input
Language: C

#include<stdio.h>
int f(int n)
if(n == 0 || n == 1)
return n;
else return f(n - 2)+f(n - 1);
}

int main(){
int n;
scanf("%d",&n);
if(n >= 0)
printf("f(%d) = %d\n",n,f(n));
return 0;
}

Compiler output:
main.c: In function 'f':
main.c:3:1: error: expected declaration specifiers before 'if'
    3 | if(n == 0 || n == 1)
      | ^~
main.c:5:1: error: expected declaration specifiers before 'else'
    5 | else return f(n - 2)+f(n - 1);
      | ^~~~
main.c:6:1: error: expected declaration specifiers before '}' token
    6 | }
      | ^
main.c:8:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    8 | int main(){
      |           ^
main.c:15: error: expected '{' at end of input
Language: C

#include<stdio.h>

int T[50];
 int f(int n){
     if(n == 0 || n == 1)
  return T[n] = 1;
     if (T[n] != -1)
  return T[n];
  return T[n] = f(n-1) + f(n - 2);
}
 int main(){
   int n,i;
    for(i = 0, i < 50; i++)
    T[i] = -1;

    scanf("%d",&n);
    printf("%d\n",f(n));
    
   return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:13:27: error: expected ';' before ')' token
   13 |     for(i = 0, i < 50; i++)
      |                           ^
      |                           ;
Language: C

#include<stdio.h>

int dp[50];
 int f(int n){
     if(n == 0 || n == 1)
  return dp[n] = 1;
     if (dp[n] != -1)
  return dp[n];
  return dp[n] = f(n-1) + f(n - 2);
}
 int main(){
   int n,i;
    for(i = 0, i < 50; i++)
    dp[i] = -1;

    scanf("%d",&n);
    printf("%d\n",f(n));
    
   return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:13:27: error: expected ';' before ')' token
   13 |     for(i = 0, i < 50; i++)
      |                           ^
      |                           ;
Language: C

#include<stdio.h>

int dp[50];
 int f(int n){
     if(n == 0 || n == 1)
  return dp[n] = 1;
     if (dp[n] != -1)
  return dp[n];
  return dp[n] = f(n-1) + f(n - 2);
}
 int main(void){
   int n,i;
    for(i = 0, i < 50; i++)
    dp[i] = -1;

    scanf("%d",&n);
    printf("%d\n",f(n));
    
   return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:13:27: error: expected ';' before ')' token
   13 |     for(i = 0, i < 50; i++)
      |                           ^
      |                           ;
Language: C

#include<stdio.h>

int dp[50];
 int f(int n){
     if(n == 0 || n == 1)
  return dp[n] = 1;
     if (dp[n] != -1)
  return dp[n];
  return dp[n] = f(n-1) + f(n - 2);
}
 int main(void){
   int n,i;
    for(i = 0, i < 50; i++){
    dp[i] = -1;

    scanf("%d",&n);
    printf("%d\n",f(n));
   } 
   return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:13:27: error: expected ';' before ')' token
   13 |     for(i = 0, i < 50; i++){
      |                           ^
      |                           ;
Language: C

#include<stdio.h>

int dp[50];
 int f(int n){
     if(n == 0 || n == 1)
  return dp[n] = 1;
     if (dp[n] != -1)
  return dp[n];
  return dp[n] = f(n-1) + f(n - 2);
}
 int main(void){
   int n,i;
    for (i = 0, i < 50; i++){
    dp[i] = -1;

    scanf("%d",&n);
    printf("%d\n",f(n));
   } 
   return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:13:28: error: expected ';' before ')' token
   13 |     for (i = 0, i < 50; i++){
      |                            ^
      |                            ;
Language: C

#include<stdio.h>

int dp[50];
 int fib(int n){
     if(n == 0 || n == 1)
  return dp[n] = 1;
     if (dp[n] != -1)
  return dp[n];
  return dp[n] = fib(n-1) + fib(n - 2);
}
 int main(void){
   int n,i;
    for (i = 0, i < 50; i++){
    dp[i] = -1;

    scanf("%d",&n);
    printf("%d\n",fib(n));
   } 
   return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:13:28: error: expected ';' before ')' token
   13 |     for (i = 0, i < 50; i++){
      |                            ^
      |                            ;
Language: C

#include<stdio.h>

int dT[50];
 int f(int n){
     if(n == 0 || n == 1)
  return T[n] = 1;
     if (T[n] != -1)
  return T[n];
  return T[n] = f(n-1) + f(n - 2);
}
 int main(void){
   int n,i;
    for (i = 0; i < 50; i++){
    T[i] = -1;

    scanf("%d",&n);
    printf("%d\n",f(n));
   } 
   return 0;
} 

Compiler output:
main.c: In function 'f':
main.c:6:10: error: 'T' undeclared (first use in this function)
    6 |   return T[n] = 1;
      |          ^
main.c:6:10: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:14:5: error: 'T' undeclared (first use in this function)
   14 |     T[i] = -1;
      |     ^
Language: C

#include <stdio.h>

int main(void)
{
  int n;

  scanf("%d", &n);

  ans[0] = 1;
  ans[1] = 1;

  for(i = 3; i < n; i++) {
    ans[i] = ans[i-1] + ans[i-2];
  }

  printf("%d\n", ans[n]);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:3: error: 'ans' undeclared (first use in this function)
    9 |   ans[0] = 1;
      |   ^~~
main.c:9:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:7: error: 'i' undeclared (first use in this function)
   12 |   for(i = 3; i < n; i++) {
      |       ^
Language: C

#include <stdio.h>

int main(void)
{
  int n;

  scanf("%d", &n);

  ans[0] = 1;
  ans[1] = 1;

  for(int i = 3; i < n; i++) {
    ans[i] = ans[i-1] + ans[i-2];
  }

  printf("%d\n", ans[n]);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:3: error: 'ans' undeclared (first use in this function)
    9 |   ans[0] = 1;
      |   ^~~
main.c:9:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int fibo(int n){
    for(i=0; i<=n; i++){
        if(i==0 || i==1)fib[i] = 1;
        else fib[i] = fib[i-2] + fib[i-1];
    }
    if(n==0 || n==1) return fib[n];
    else {
        f = fib[n-1]+fib[n-2];
        return f;
    }
}
int main(){
    int n,f,i;
    int fib[50];
    scanf("%d", &n);
    printf("%d",fibo(n));
    return 0;
}


Compiler output:
main.c: In function 'fibo':
main.c:4:9: error: 'i' undeclared (first use in this function)
    4 |     for(i=0; i<=n; i++){
      |         ^
main.c:4:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:25: error: 'fib' undeclared (first use in this function); did you mean 'fibo'?
    5 |         if(i==0 || i==1)fib[i] = 1;
      |                         ^~~
      |                         fibo
main.c:10:9: error: 'f' undeclared (first use in this function)
   10 |         f = fib[n-1]+fib[n-2];
      |         ^
Language: C

#include<stdio.h>

long long fibo(int n){
	if(n==0||n==1)retrn 0;
	return fibo(n-1)+fibo(n-2);
}
 int main(void){
	printf("fibo(0)=%ld\n",fibo(0));
	printf("fibo(1)=%ld\n",fibo(1));
	printf("fibo(2)=%ld\n",fibo(2));
	printf("fibo(3)=%ld\n",fibo(3));
	printf("fibo(4)=%ld\n",fibo(4));

return(0);
}







Compiler output:
main.c: In function 'fibo':
main.c:4:23: error: 'retrn' undeclared (first use in this function)
    4 |         if(n==0||n==1)retrn 0;
      |                       ^~~~~
main.c:4:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:28: error: expected ';' before numeric constant
    4 |         if(n==0||n==1)retrn 0;
      |                            ^~
      |                            ;