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

mport java.util.Scanner;
public class Main {
        public static void main(String[] args){
                final Scanner sc=new Scanner(System.in);
                int n=sc.nextInt();
                int[] matrix=new int[n+1];
                matrix[0]=matrix[1]=1;
                for(int i=2;i<=n;i++){
                        matrix[i]=matrix[i-1]+matrix[i-2];
                }
                System.out.println(matrix[n]);
        }
        
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
Language: Java

import java.util.Scanner;

public class Main{

  public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        System.out.println(Fib(n));        
       
    
  }

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

}

Compiler output:
Main.java:8: error: non-static method Fib(int) cannot be referenced from a static context
        System.out.println(Fib(n));        
                           ^
1 error
Language: Java

package aoj.alds1_10_A_Fibonacci_Number;

import java.util.Scanner;

/**
 * Author: zhang
 * Time: 8/12/2017
 * Description:
 */
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        System.out.println(Fib(n));

    }

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


    }


}

Compiler output:
Main.java:14: error: non-static method Fib(int) cannot be referenced from a static context
        System.out.println(Fib(n));
                           ^
1 error
Language: Java

import java.util.Scanner;

/**
 * Author: zhang
 * Time: 8/12/2017
 * Description:
 */
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        System.out.println(Fib(n));

    }

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


    }


}

Compiler output:
Main.java:12: error: non-static method Fib(int) cannot be referenced from a static context
        System.out.println(Fib(n));
                           ^
1 error
Language: Java

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		System.out.println(Fibonacci(n));
		scanner.close();
	}

	public static int Fibonacci(int n) {
		if (n <= 1)
			return 1;
		else
			return Fibonacci(n - 1) + Fibonacci(n - 2);
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner scanner = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner scanner = new Scanner(System.in);
		                      ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

package dynamicProgramming;

import java.util.Arrays;
import java.util.Scanner;

public class LongestCommonSubsequence {
	void run() {
		Scanner sc = new Scanner(System.in);
		
		sc.close();
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new LongestCommonSubsequence().run();
	}
}

Compiler output:
Main.java:6: error: class LongestCommonSubsequence is public, should be declared in a file named LongestCommonSubsequence.java
public class LongestCommonSubsequence {
       ^
1 error
Language: Java

package dynamicProgramming;

import java.util.Arrays;
import java.util.Scanner;

public class MatrixChainMultiplication {
	int dp[];
	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		dp = new int[n+1];
		int ans = fib(n);
		System.out.println(ans);
		sc.close();
	}
	
	private int fib(int n) {
		// TODO Auto-generated method stub
		if(n == 0 || n == 1) return dp[n] = 1;
		if(dp[n] != 0) return dp[n];
		return dp[n] = fib(n-1) + fib(n-2);
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new MatrixChainMultiplication().run();
	}
}

Compiler output:
Main.java:6: error: class MatrixChainMultiplication is public, should be declared in a file named MatrixChainMultiplication.java
public class MatrixChainMultiplication {
       ^
1 error
Language: Java


import java.util.Arrays;
import java.util.Scanner;

public class Main {
	int dp[];
	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		dp = new int[n+1];
		int ans = fib(n);
		System.out.println(ans);
		sc.close();
	}
	
	private int fib(int n) {
		// TODO Auto-generated method stub
		if(n == 0 || n == 1) return dp[n] = 1;
		if(dp[n] != 0) return dp[n];
		return dp[n] = fib(n-1) + fib(n-2);
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new MatrixChainMultiplication().run();
	}
}

Compiler output:
Main.java:28: error: cannot find symbol
		new MatrixChainMultiplication().run();
		    ^
  symbol:   class MatrixChainMultiplication
  location: class Main
1 error
Language: Java

mport java.util.Scanner;

class Main {
	static int Fibonacci (int n) {
		
		n = (int)((1 / Math.sqrt(5.0)) * 
				((Math.pow(((1.0 + Math.sqrt(5.0)) / 2.0), (double)n))
						- (Math.pow(((1.0 - Math.sqrt(5.0)) / 2.0), (double)n))));
		
		return n;
	}
	
	public static void main (String[] args) {
		Scanner scan = new Scanner (System.in);
		int n = Fibonacci (scan.nextInt());
		scan.close();
		System.out.println(n);
	}
}



Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
Language: Java

import java.util.Scanner;


class Main {
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int  num = scanner.nextInt();//階層数
		long fin;
		
		fin =  fin(num);

		System.out.println(fin);
		
		scanner.close();
	}
	
	public static long fin(int num) {
		long Fin0 = 1,Fin1 = 1,Fin = 0;
		
		if( num == 0 ) return 0;
		if( num == 1 ) return 1;
		
		for(int i = 1; i < num; i ++) {
			Fin = Fin0 + Fin1;
			Fin0 = Fin1;
			Fin1 = Fin;
		}
		
		return Fin; 
	}
}

/* 実行時間計測用

		long start = System.currentTimeMillis();
		long end = System.currentTimeMillis();
		System.out.println((end - start)  + "ms:計測時間");
*/import java.util.Scanner;


class Main {
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int  num = scanner.nextInt();//階層数
		long fin;
		
		fin =  fin(num);

		System.out.println(fin);
		
		scanner.close();
	}
	
	public static long fin(int num) {
		long Fin0 = 1,Fin1 = 1,Fin = 0;
		
		if( num == 0 ) return 0;
		if( num == 1 ) return 1;
		
		for(int i = 1; i < num; i ++) {
			Fin = Fin0 + Fin1;
			Fin0 = Fin1;
			Fin1 = Fin;
		}
		
		return Fin; 
	}
}

/* 実行時間計測用

		long start = System.currentTimeMillis();
		long end = System.currentTimeMillis();
		System.out.println((end - start)  + "ms:計測時間");
*/


Compiler output:
Main.java:38: error: class, interface, enum, or record expected
*/import java.util.Scanner;
  ^
1 error
Language: Java

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		// System.out.println(Main.fibonacciNumber(scan.nextInt()));
		System.out.println(Main.fibonacciNumberDP(scan.nextInt()));
	}

	// 再帰
	static int fibonacciNumber(int n) {
		if (n == 0) {
			return 1;
		} else if (n == 1) {
			return 1;
		} else {
			return fibonacciNumber(n - 1) + fibonacciNumber(n - 2);
		}
	}

	// DP
	static int fibonacciNumberDP(int n) {
		int[] fib = new int[n + 1];
		fib[0] = 1;

		if (fib.length >= 2){
			fib[1] = 1;
		}

		for (int i = 2; i < fib.length; i++) {
			fib[i] = fib[i - 1] + fib[i - 2];
		}

		return fib[n];
	}

}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:34: error: class, interface, enum, or record expected
}
^
2 errors
Language: C

#include<stdio.h>

int fib( int);
int main() {
	int n,i;
	
	scanf("%d",&n);
	
	if(n==0) printf("0\n");
	else if(n==1) printf("1\n");
	
	else { 
i=fib(n);
	printf("%d\n",i);
	}
	return 0;
}
	
	
	
	int fib(int n) {
		if(n==1 ) return 1;
		else if(n==0) return 0;
		else if(n==2) return 1
		else if(n=>3)return fib(n-1)+fib(n-2);
		
		
		}


Compiler output:
main.c: In function 'fib':
main.c:24:39: error: expected ';' before 'else'
   24 |                 else if(n==2) return 1
      |                                       ^
      |                                       ;
   25 |                 else if(n=>3)return fib(n-1)+fib(n-2);
      |                 ~~~~
Language: C

#include<stdio.h>

int fib( int);
int main() {
	int n,i;
	
	scanf("%d",&n);
	
	if(n==0) printf("0\n");
	else if(n==1) printf("1\n");
	
	else { 
i=fib(n);
	printf("%d\n",i);
	}
	return 0;
}
	
	
	
	int fib(int n) {
		if(n==1 ) return 1;
		else if(n==0) return 0;
		else if(n==2) return 1
		else return fib(n-1)+fib(n-2);
		
		
		}


Compiler output:
main.c: In function 'fib':
main.c:24:39: error: expected ';' before 'else'
   24 |                 else if(n==2) return 1
      |                                       ^
      |                                       ;
   25 |                 else return fib(n-1)+fib(n-2);
      |                 ~~~~
Language: C

#include<stdio.h>

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

	printf("%d\n",fib(n));
	
	return 0;
}
	
	
	
	int fib(int n) {
		if(n==1  || 　n==0) return 1;
		
		else return fib(n-1)+fib(n-2);
		
		
		}


Compiler output:
main.c: In function 'fib':
main.c:19:29: error: stray '\343' in program
   19 |                 if(n==1  || <U+3000>n==0) return 1;
      |                             ^~~~~~~~
Language: C


		#include<stdio.h>

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

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


Compiler output:
main.c: In function 'fib':
main.c:26:30: error: expected ';' before '}' token
   26 |                 return F[i-1]
      |                              ^
      |                              ;
   27 |                 }
      |                 ~
Language: C

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

  int n;
  
  scanf("%d",&n);
  printf("%lld\n",fibnacci(n));
  
  return 0;
}
long long  fibnacci(int i){

  if(i==0||i==1) return 1;
  return fibnacci(i-2)+fibnacci(i-1);
}



Compiler output:
main.c:12:12: error: conflicting types for 'fibnacci'; have 'long long int(int)'
   12 | long long  fibnacci(int i){
      |            ^~~~~~~~
main.c:2:5: note: previous declaration of 'fibnacci' with type 'int(int)'
    2 | int fibnacci(int);
      |     ^~~~~~~~
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 <stdio.h>
#define N 44

int F[N];

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

int main(){
  int n,i;

  for(i=0; i<N; i++){
    T[i] = -1;
  }

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

  return 0;

}



Compiler output:
main.c: In function 'fib':
main.c:8:25: error: 'T' undeclared (first use in this function)
    8 |   if(F[n] != -1) return T[n];
      |                         ^
main.c:8:25: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:16:5: error: 'T' undeclared (first use in this function)
   16 |     T[i] = -1;
      |     ^
Language: C

#include <stdio.h>
int fib[45];
int fibonacci(int n){
  if(n==0 || n==1) return fib[n]=1;
  if(fib[n]!=-1) return fib[n];
  return fib[n]=fibonacci(n-1)+fibonacci(n-2);
}

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


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

#include<stdio.h>
#include<stdlib.h>
int a[50];
int fib(int n)
{
  if(n == 0 || n == 1)
    {
      a[n] = 1;
    }
  if(a[n] != -1)
    {
      return a[n];
    }
  return a[n] = fib(n - 1) + fib(n - 2);
}

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



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

#include<stdio.h>
  
int fibonacci(int);
int F[44];

int main(){
  int n;
  int f;
  int i;

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

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



Compiler output:
main.c: In function 'fibonacci':
main.c:20:32: error: expected ';' before 'return'
   20 |   if(n == 0 || n == 1) return 1
      |                                ^
      |                                ;
   21 |   return fibonacci(n-2) + fibonacci(n-1);
      |   ~~~~~~
Language: C

#include"iostream"
using namespace std;
int main()
{
  int a,b,c;
  int n;
  cin>>n;
  c=1;
  a=1;b=1;
  for(int i=1;i<n;i++)
    {
      c=a+b;
      a=b;
      b=c;
    }
  cout<<c<<endl;
  return 0;
}


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

#include <stdio.h>
 
#define INF 10000000
 
int main(){
  int n,i,j,k,l,q,r[100],c[100],p[101];
  int mm[101][101];
  
  
  scanf("%d",&n);
  for(i = 0 ; i < n; i++){
    scanf("%d%d",&m[i],&M[i]);
  }

  for(i = 0 ; i < Nn ; i++){
  	for(i=1;i<n-l+2;i++) {
  		j=i+l-1;
    mm[i][j] = 0;
  }
  
    for(k = i ; k < j-1 ; k++){
t=mm[i][k] + mm[k+1][j] + M[i-1] * M[k] *M[j];

        if(t < mm[i][j]){
          mm[i][j] = t;
        }
      }
    }
  
  printf("%d\n",mm[1][n]);
  return 0;
  }



Compiler output:
main.c: In function 'main':
main.c:12:19: error: 'm' undeclared (first use in this function); did you mean 'mm'?
   12 |     scanf("%d%d",&m[i],&M[i]);
      |                   ^
      |                   mm
main.c:12:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:25: error: 'M' undeclared (first use in this function)
   12 |     scanf("%d%d",&m[i],&M[i]);
      |                         ^
main.c:15:19: error: 'Nn' undeclared (first use in this function); did you mean 'n'?
   15 |   for(i = 0 ; i < Nn ; i++){
      |                   ^~
      |                   n
main.c:22:1: error: 't' undeclared (first use in this function)
   22 | t=mm[i][k] + mm[k+1][j] + M[i-1] * M[k] *M[j];
      | ^
Language: C

#include<stdio.h>
int T[500000];
int size;

void maxheap(int i)
{
  int l,r,max=0,tmp;
  l=left(i);
  r=right(i);
  if(l<=size&&T[l]>T[i])
     {
    
      max=l;
    }
  else
    {
      max=i;
    }
  if(r<=size && T[r]>T[max])
    {
      max = r;
    }
  if(max != i){
    tmp=T[i];
    T[i]=T[max];
    T[max]=tmp;
    maxheap(max);
  }
}

void buildmax(void)
{
  int i;
  for(i=size/2;i>=1;i--)
    {
      maxheap(i);
    }
}

int right(int i){
  return 2*i+1;
}

int left(int i)
{
  return 2*i;
}

main(){
  int i;
  scanf("%d",&size);
  for(i=1;i<=size;i++)
    {
      scanf("%d",&T[i]);
    }
  buildmax();
  for(i=1;i<=size;i++)
    {
      print(" %d",T[i]);
    }
  printf("\n");
  return 0;
}



Compiler output:
main.c: In function 'maxheap':
main.c:8:5: error: implicit declaration of function 'left' [-Wimplicit-function-declaration]
    8 |   l=left(i);
      |     ^~~~
main.c:9:5: error: implicit declaration of function 'right' [-Wimplicit-function-declaration]
    9 |   r=right(i);
      |     ^~~~~
main.c: At top level:
main.c:49:1: error: return type defaults to 'int' [-Wimplicit-int]
   49 | main(){
      | ^~~~
main.c: In function 'main':
main.c:59:7: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   59 |       print(" %d",T[i]);
      |       ^~~~~
      |       printf
Language: C

#include<stdio.h>

int f(int n){
  return (n<2)?1:(fib(n-1)+fib(n-2));
}

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



Compiler output:
main.c: In function 'f':
main.c:4:19: error: implicit declaration of function 'fib' [-Wimplicit-function-declaration]
    4 |   return (n<2)?1:(fib(n-1)+fib(n-2));
      |                   ^~~
Language: C

#include<stdio.h>

int fi(int n){
  return (n<2)?1:(fib(n-1)+fib(n-2));
}

int main(){
  int n;
  scanf("%d",&n);
  printf("%d\n",fi(n));  
  return 0;
}



Compiler output:
main.c: In function 'fi':
main.c:4:19: error: implicit declaration of function 'fib'; did you mean 'fi'? [-Wimplicit-function-declaration]
    4 |   return (n<2)?1:(fib(n-1)+fib(n-2));
      |                   ^~~
      |                   fi
Language: C

#include<stdio.h>

main(void){
  int n,F[45];


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



Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(void){
      | ^~~~
main.c: In function 'main':
main.c:8:7: error: 'i' undeclared (first use in this function)
    8 |   for(i=2;i<45;i++){
      |       ^
main.c:8:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:17: error: implicit declaration of function 'fib' [-Wimplicit-function-declaration]
   13 |   printf("%d\n",fib(n));
      |                 ^~~
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)retunr dp[n];
    return dp[n]=fib(n-1)+fib(n-2);
}

int main()
{
    int n=0,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:17: error: expected ')' before numeric constant
    6 |     if(n==0||n--1)return dp[n]=1;
      |       ~         ^
      |                 )
main.c:7:18: error: 'retunr' undeclared (first use in this function)
    7 |     if(dp[n]!=-1)retunr dp[n];
      |                  ^~~~~~
main.c:7:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:24: error: expected ';' before 'dp'
    7 |     if(dp[n]!=-1)retunr dp[n];
      |                        ^~~
      |                        ;
Language: C

#define MAX 44
#define MIN 0

 int fib(int);

 int main(){
   int n, f;
  
   if(scanf("%d", &n)==EOF) exit(2);
   if(n<=MAX && n>=MIN){
     f=fib(n);
     
     printf("%d\n", f);
     
   }
   return 0;
 }
   

int fib(n){

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

}


Compiler output:
main.c: In function 'main':
main.c:9:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    9 |    if(scanf("%d", &n)==EOF) exit(2);
      |       ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #define MAX 44
main.c:9:7: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    9 |    if(scanf("%d", &n)==EOF) exit(2);
      |       ^~~~~
main.c:9:7: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:24: error: 'EOF' undeclared (first use in this function)
    9 |    if(scanf("%d", &n)==EOF) exit(2);
      |                        ^~~
main.c:9:24: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:9:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:29: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    9 |    if(scanf("%d", &n)==EOF) exit(2);
      |                             ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | #define MAX 44
main.c:9:29: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    9 |    if(scanf("%d", &n)==EOF) exit(2);
      |                             ^~~~
main.c:9:29: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:13:6: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   13 |      printf("%d\n", f);
      |      ^~~~~~
main.c:13:6: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:6: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:13:6: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: In function 'fib':
main.c:20:5: error: type of 'n' defaults to 'int' [-Wimplicit-int]
   20 | int fib(n){
      |     ^~~
Language: C

#include <stdio.h>
int fibonacci(int);
int f[44];
int main(){
  int n,i;

  for(i=0;i<44;i++) f[i]=0;
  scanf("%d",&n);
  fibonacci(n);
  printf("%d\n",fibonacci(n));

  return 0;
}

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



Compiler output:
main.c: In function 'fibonacci':
main.c:17:27: error: called object 'f' is not a function or function pointer
   17 |   if(f[n]!=0) return f[n]=f(n-1)+f(n-2);
      |                           ^
main.c:3:5: note: declared here
    3 | int f[44];
      |     ^
main.c:17:34: error: called object 'f' is not a function or function pointer
   17 |   if(f[n]!=0) return f[n]=f(n-1)+f(n-2);
      |                                  ^
main.c:3:5: note: declared here
    3 | int f[44];
      |     ^
Language: C

#include<stdio.h>
int n,i;
int F[50];

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:5:7: error: expected declaration specifiers or '...' before string constant
    5 | scanf("%d",&n);
      |       ^~~~
main.c:5:12: error: expected declaration specifiers or '...' before '&' token
    5 | scanf("%d",&n);
      |            ^
main.c:7:1: warning: data definition has no type or storage class
    7 | F[0]=F[1]=1;
      | ^
main.c:7:1: error: type defaults to 'int' in declaration of 'F' [-Wimplicit-int]
main.c:7:1: error: conflicting types for 'F'; have 'int[0]'
main.c:3:5: note: previous declaration of 'F' with type 'int[50]'
    3 | int F[50];
      |     ^
main.c:7:6: error: invalid initializer
    7 | F[0]=F[1]=1;
      |      ^
main.c:8:1: error: expected identifier or '(' before 'for'
    8 | for(i=2;i<=n;i++)
      | ^~~
main.c:8:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
    8 | for(i=2;i<=n;i++)
      |          ^~
main.c:8:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    8 | for(i=2;i<=n;i++)
      |               ^~
main.c:11:8: error: expected declaration specifiers or '...' before string constant
   11 | printf("%d\n",F[n]);
      |        ^~~~~~
main.c:11:15: error: expected declaration specifiers or '...' before 'F'
   11 | printf("%d\n",F[n]);
      |               ^
main.c:13:1: error: expected identifier or '(' before 'return'
   13 | return 0;
      | ^~~~~~
main.c:14:1: error: expected identifier or '(' before '}' token
   14 | }
      | ^
Language: C

#include<stdio.h>

 int A[50];

 int fib(int n){
      A[0]=A[1]=1;
      for(i=2;i<=n;i++){
            A[i]=A[i-1]+A[i-2];
            }
      return A[n];
      }


 int main(){
      int n;
      scanf("%d",&n);
      int k=fib(n);
      printf("%d\n",k);
      return 0;
     }



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

#Include <stdio.h>
#define N 44
int fibonacci(int);
int main(){
  int n;
  scanf("%d", &n);
  if( n==N )return 0;
  printf("%d\n",fibonacci(n));
  return 0;
}
int fibonacci(int n){
  if( n==0 || n==1 ) return 1;
  else return fibonacci(n-1)+fibonacci(n-2);
}

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:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   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:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%d", &n);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    8 |   printf("%d\n",fibonacci(n));
      |   ^~~~~~
main.c:8:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:8:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

include <stdio.h>

int fibo[45];

void Fibo(int n,int max){
  if (n>=2){
    fibo[n]=fibo[n-1]+fibo[n-2];
  }
  if (n!=max){
    Fibo(n+1,max);
  }
}

int main() {
  int n;
  fibo[0]=fibo[1]=1;
  scanf("%d",&n);
  Fibo(2,n);
  printf ("%d\n",fibo[n]);
  return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'Fibo':
main.c:7:5: error: 'fibo' undeclared (first use in this function); did you mean 'Fibo'?
    7 |     fibo[n]=fibo[n-1]+fibo[n-2];
      |     ^~~~
      |     Fibo
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:16:3: error: 'fibo' undeclared (first use in this function); did you mean 'Fibo'?
   16 |   fibo[0]=fibo[1]=1;
      |   ^~~~
      |   Fibo
main.c:17:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   17 |   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:17:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   17 |   scanf("%d",&n);
      |   ^~~~~
main.c:17:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:19:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   19 |   printf ("%d\n",fibo[n]);
      |   ^~~~~~
main.c:19:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:19:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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

Compiler output:
main.c:1:8: error: expected declaration specifiers or '...' before string constant
    1 |  scanf("%d",&n);
      |        ^~~~
main.c:1:13: error: expected declaration specifiers or '...' before '&' token
    1 |  scanf("%d",&n);
      |             ^
main.c:2:3: error: expected identifier or '(' before 'for'
    2 |   for(i=0;i<=n;i++){
      |   ^~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
    2 |   for(i=0;i<=n;i++){
      |            ^~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    2 |   for(i=0;i<=n;i++){
      |                 ^~
main.c:8:10: error: expected declaration specifiers or '...' before string constant
    8 |   printf("%d\n",f[n]);
      |          ^~~~~~
main.c:8:17: error: unknown type name 'f'
    8 |   printf("%d\n",f[n]);
      |                 ^
Language: C

#include <stdio.h>

int F[45];
int fib(int);

main() {
  int n, i

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

  scanf("%d", &n);

  for(i = 2; i < 45; i++) {
    F[i] = 0;
  }

  for(i = 2; i <= n; i++) {
    F[i] = fib(i);
  }

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

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

Compiler output:
main.c:6:1: error: return type defaults to 'int' [-Wimplicit-int]
    6 | main() {
      | ^~~~
main.c: In function 'main':
main.c:9:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'F'
    9 |   F[0] = 1;
      |   ^
main.c:14:7: error: 'i' undeclared (first use in this function)
   14 |   for(i = 2; i < 45; i++) {
      |       ^
main.c:14:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C


#include<stdio.h>

int main(){

  int 
  int i;
  int z;
  int x;
  int y;

  x = 1;
  y = 1;

  
  scanf("%d",&n);
  
  for(i = 0 ; i < n - 1 ; i++){
    
    z = x + y;
    
    x = y;
  
    y = z;
  }
 
  printf("%d\n",z);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: two or more data types in declaration specifiers
    7 |   int i;
      |   ^~~
main.c:16:15: error: 'n' undeclared (first use in this function)
   16 |   scanf("%d",&n);
      |               ^
main.c:16:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
 
int fi(int);
int N[45];
 
int main(void){

  int n;

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

  int i;
  N[0] = 1;
  N[1] = 1;
 
  for( i = 2 ; i <= x ; i++ ){
    N[i] = N[i-1] + N[i-2];
  }
  return N[x];
}
}

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

#include <stdio.h>
 
int U[45];
 
int main(void) {
  int i, n;
  for (i = 0; i < 45; i++) {
    U[i] = 0;
  }
  scanf("%d", &n);
 
  printf("%d\n", onacch(n));
 
  return 0;
}

int fibonacch(int x) {
  // if (U[x] != -1) {
  //   return U[x];
  // }
  if (x == 0 || x == 1) {
    U[x] = 1;
    return U[x];
  } else {
    U[x] = fibonacch(x - 1) + fibonacch(x - 2);
    return U[x];
  }
}

Compiler output:
main.c: In function 'main':
main.c:12:18: error: implicit declaration of function 'onacch' [-Wimplicit-function-declaration]
   12 |   printf("%d\n", onacch(n));
      |                  ^~~~~~
Language: C

#include <stdio.h>
 
int U[45];
 
int main(void) {
  int i, n;
  for (i = 0; i < 45; i++) {
    U[i] = 0;
  }
  scanf("%d", &n);
 
  printf("%d\n", onacch(n));
 
  return 0;
}

int fibonacch(int x) {
  if (U[x] != -1) {
    return U[x];
  }
  if (x == 0 || x == 1) {
    U[x] = 1;
    return U[x];
  } else {
    U[x] = fibonacch(x - 1) + fibonacch(x - 2);
    return U[x];
  }
}

Compiler output:
main.c: In function 'main':
main.c:12:18: error: implicit declaration of function 'onacch' [-Wimplicit-function-declaration]
   12 |   printf("%d\n", onacch(n));
      |                  ^~~~~~
Language: C

#include<stdio.h>
#define N 44
int a[N];

int fibona(int i){
  if(n[j]==NULL){
    if(i==0||i==1)  a[i]=1;
    else{
      a[i]=fibona(i-1)+fibona(i-2);
    }
  }
  return a[i];
}
int main(){

  int n,i,p,q;
  scanf("%d",&n);
  printf("%d\n",fibona(n));
  return 0;
}

Compiler output:
main.c: In function 'fibona':
main.c:6:6: error: 'n' undeclared (first use in this function)
    6 |   if(n[j]==NULL){
      |      ^
main.c:6:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:8: error: 'j' undeclared (first use in this function)
    6 |   if(n[j]==NULL){
      |        ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:12: error: 'f' undeclared (first use in this function)
   10 |     fib[i]=f[i-1]+fib[i-2];
      |            ^
main.c:10:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:18: error: called object 'fib' is not a function or function pointer
   12 |   printf("%d\n", fib(n));
      |                  ^~~
main.c:4:9: note: declared here
    4 |   int n,fib[Max],i;
      |         ^~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:12: error: 'f' undeclared (first use in this function)
   10 |     fib[i]=f[i-1]+fib[i-2];
      |            ^
main.c:10:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:18: error: called object 'fib' is not a function or function pointer
   12 |   printf("%d\n", fib(n));
      |                  ^~~
main.c:4:9: note: declared here
    4 |   int n,fib[Max],i;
      |         ^~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:12:18: error: called object 'fib' is not a function or function pointer
   12 |   printf("%d\n", fib(n));
      |                  ^~~
main.c:4:9: note: declared here
    4 |   int n,fib[Max],i;
      |         ^~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:2:1: error: parameter 'fi' is initialized
    2 | int main()int fi[3]=(1,1,1},n;
      | ^~~
main.c:2:27: error: expected ')' before '}' token
    2 | int main()int fi[3]=(1,1,1},n;
      |                     ~     ^
      |                           )
main.c:2:21: error: variable-sized object may not be initialized except with an empty initializer
    2 | int main()int fi[3]=(1,1,1},n;
      |                     ^
main.c:2:27: error: expected ',' or ';' before '}' token
    2 | int main()int fi[3]=(1,1,1},n;
      |                           ^
main.c:2:28: error: expected declaration specifiers before ',' token
    2 | int main()int fi[3]=(1,1,1},n;
      |                            ^
main.c:3:1: error: expected declaration specifiers before 'scanf'
    3 | scanf("%d",&n);
      | ^~~~~
main.c:4:1: error: expected declaration specifiers before 'while'
    4 | while(1<n--){
      | ^~~~~
main.c:9:1: error: expected declaration specifiers before 'printf'
    9 | printf("%d\n",f[2]);
      | ^~~~~~
main.c:10:1: error: expected declaration specifiers before 'return'
   10 | return 0;
      | ^~~~~~
main.c:11:1: error: expected declaration specifiers before '}' token
   11 | }
      | ^
main.c:2:15: error: declaration for parameter 'fi' but no such parameter
    2 | int main()int fi[3]=(1,1,1},n;
      |               ^~
main.c:12: error: expected '{' at end of input
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:2:1: error: parameter 'fi' is initialized
    2 | int main()int fi[3]=(1,1,1},n;
      | ^~~
main.c:2:27: error: expected ')' before '}' token
    2 | int main()int fi[3]=(1,1,1},n;
      |                     ~     ^
      |                           )
main.c:2:21: error: variable-sized object may not be initialized except with an empty initializer
    2 | int main()int fi[3]=(1,1,1},n;
      |                     ^
main.c:2:27: error: expected ',' or ';' before '}' token
    2 | int main()int fi[3]=(1,1,1},n;
      |                           ^
main.c:2:28: error: expected declaration specifiers before ',' token
    2 | int main()int fi[3]=(1,1,1},n;
      |                            ^
main.c:3:1: error: expected declaration specifiers before 'scanf'
    3 | scanf("%d",&n);
      | ^~~~~
main.c:4:1: error: expected declaration specifiers before 'while'
    4 | while(1<n--){
      | ^~~~~
main.c:9:1: error: expected declaration specifiers before 'printf'
    9 | printf("%d\n",fi[2]);
      | ^~~~~~
main.c:10:1: error: expected declaration specifiers before 'return'
   10 | return 0;
      | ^~~~~~
main.c:11:1: error: expected declaration specifiers before '}' token
   11 | }
      | ^
main.c:2:15: error: declaration for parameter 'fi' but no such parameter
    2 | int main()int fi[3]=(1,1,1},n;
      |               ^~
main.c:12: error: expected '{' at end of input
Language: C

#include "stdio.h"

int main(int argc, char const *argv[])
{
	int kaku[50];
	int bango;
	int i;
	kaku[0] = 1;
	kaku[1] = 1;
	scanf("%d",&bango);
	for(i = 2;i < 1000;i++){
		kaku[i] = kaku[i - 2] + kaku[i - 1];
	}
	printf("%d", kaku[bago]);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:27: error: 'bago' undeclared (first use in this function); did you mean 'bango'?
   14 |         printf("%d", kaku[bago]);
      |                           ^~~~
      |                           bango
main.c:14:27: note: each undeclared identifier is reported only once for each function it appears in
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 'main':
main.c:17:9: error: '\U000000a8' undeclared (first use in this function)
   17 |   scanf(¨%d¨, &n);
      |         ^
main.c:17:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:11: error: 'd\U000000a8' undeclared (first use in this function)
   17 |   scanf(¨%d¨, &n);
      |           ^~
main.c:18:13: error: stray '\' in program
   18 |   printf(¨%d\n¨,fib(n));
      |             ^
main.c:18:12: error: 'd' undeclared (first use in this function)
   18 |   printf(¨%d\n¨,fib(n));
      |            ^
main.c:18:13: error: expected ')' before 'n\U000000a8'
   18 |   printf(¨%d\n¨,fib(n));
      |         ~   ^~~
      |             )
Language: C

#include<stdio.h>
#define N 44

main(){

  int fib[N],i,n;

  scanf("%d",&n);

  for( i = 0 ; i <= n ; i++ ){
    
    if( i == 0 )
      fib[i] = 1;
    if( i == 1)
      fib[i] = 1;
    if( 1 < n )
      fib[i] = fib[ n - 2 ] - fib[ n - 1 ];
    else
      print("%d\n",fib[i]);

  }

    return 0;
      

}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'main':
main.c:19:7: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   19 |       print("%d\n",fib[i]);
      |       ^~~~~
      |       printf
Language: C

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

int fib(int n, int F[]){
  f[0] = 1;
  f[1] = 1;
  if(F[n] != -1) return F[n];
  F[n] =  fib(n-1)+fib(n-2);
  return F[n];
}

Compiler output:
main.c: In function 'main':
main.c:8:18: error: too many arguments to function 'fib'
    8 |   printf("%d\n", fib(n, F));
      |                  ^~~
main.c:2:5: note: declared here
    2 | int fib(int);
      |     ^~~
main.c: At top level:
main.c:12:5: error: conflicting types for 'fib'; have 'int(int,  int *)'
   12 | int fib(int n, int F[]){
      |     ^~~
main.c:2:5: note: previous declaration of 'fib' with type 'int(int)'
    2 | int fib(int);
      |     ^~~
main.c: In function 'fib':
main.c:13:3: error: 'f' undeclared (first use in this function)
   13 |   f[0] = 1;
      |   ^
main.c:13:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:11: error: too few arguments to function 'fib'
   16 |   F[n] =  fib(n-1)+fib(n-2);
      |           ^~~
main.c:12:5: note: declared here
   12 | int fib(int n, int F[]){
      |     ^~~
main.c:16:20: error: too few arguments to function 'fib'
   16 |   F[n] =  fib(n-1)+fib(n-2);
      |                    ^~~
main.c:12:5: note: declared here
   12 | int fib(int n, int F[]){
      |     ^~~
Language: C

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

int fib(int n, int F[]){
  f[0] = 1;
  f[1] = 1;
  if(F[n] != -1) return F[n];
  F[n] =  fib(n-1)+fib(n-2);
  return F[n];
}

Compiler output:
main.c: In function 'main':
main.c:8:25: error: passing argument 2 of 'fib' makes integer from pointer without a cast [-Wint-conversion]
    8 |   printf("%d\n", fib(n, F));
      |                         ^
      |                         |
      |                         int *
main.c:2:14: note: expected 'int' but argument is of type 'int *'
    2 | int fib(int, int);
      |              ^~~
main.c: At top level:
main.c:12:5: error: conflicting types for 'fib'; have 'int(int,  int *)'
   12 | int fib(int n, int F[]){
      |     ^~~
main.c:2:5: note: previous declaration of 'fib' with type 'int(int,  int)'
    2 | int fib(int, int);
      |     ^~~
main.c: In function 'fib':
main.c:13:3: error: 'f' undeclared (first use in this function)
   13 |   f[0] = 1;
      |   ^
main.c:13:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:11: error: too few arguments to function 'fib'
   16 |   F[n] =  fib(n-1)+fib(n-2);
      |           ^~~
main.c:12:5: note: declared here
   12 | int fib(int n, int F[]){
      |     ^~~
main.c:16:20: error: too few arguments to function 'fib'
   16 |   F[n] =  fib(n-1)+fib(n-2);
      |                    ^~~
main.c:12:5: note: declared here
   12 | int fib(int n, int F[]){
      |     ^~~
Language: C

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

int fib(int n, int *F){
  f[0] = 1;
  f[1] = 1;
  if(F[n] != -1) return F[n];
  F[n] =  fib(n-1, F)+fib(n-2, F);
  return F[n];
}

Compiler output:
main.c: In function 'main':
main.c:8:25: error: passing argument 2 of 'fib' from incompatible pointer type [-Wincompatible-pointer-types]
    8 |   printf("%d\n", fib(n, &F));
      |                         ^~
      |                         |
      |                         int (*)[45]
main.c:2:14: note: expected 'int *' but argument is of type 'int (*)[45]'
    2 | int fib(int, int *);
      |              ^~~~~
main.c: In function 'fib':
main.c:13:3: error: 'f' undeclared (first use in this function)
   13 |   f[0] = 1;
      |   ^
main.c:13:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int fibonacci(int,int[]);
int main(){
  int n, Fibo[50];
  int i;
  scanf("%d",&n);

  for(i = 0; i < 50#include<stdio.h>
int fibonacci(int,int[]);
int main(){
  int n, Fibo[50];
  int i;
  scanf("%d",&n);

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

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


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

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


int fibonacci(int n, int Fibo[]){
  Fibo[0] = Fibo[1] = 1;
  if (n == 0 || n == 1) return 1;
  if(Fibo[n] == -1){
    Fibo[n] = fibonacci(n-2, Fibo) + fibonacci(n-1, Fibo);
  }
  return Fibo[n];
}

Compiler output:
main.c: In function 'main':
main.c:8:20: error: stray '#' in program
    8 |   for(i = 0; i < 50#include<stdio.h>
      |                    ^
main.c:8:20: error: expected ';' before 'include'
    8 |   for(i = 0; i < 50#include<stdio.h>
      |                    ^~~~~~~~
      |                    ;
main.c:10:1: error: expected expression before 'int'
   10 | int main(){
      | ^~~
Language: C

include<stdio.h>



main(){
  int i,g,f,F[45];
  F[0]=1;
  F[1]=1;
  for(i=2;i<45;i++)
    F[i] = F[i-2] + F[i-1];


  scanf("%d",&g);
  printf("%d\n",F[g]);
}

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

include<stdio.h>

main(){
  int i,g,f,F[45];
  F[0]=1;
  F[1]=1;
  for(i=2;i<45;i++)
    F[i] = F[i-2] + F[i-1];


  scanf("%d",&g);
  printf("%d\n",F[g]);
  return 0;
}

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

include<stdio.h>

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

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

include<stdio.h>

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

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

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:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){
      | ^~~~
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%d",&n)
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%d",&n)
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:17: error: expected ';' before 'f'
    6 |   scanf("%d",&n)
      |                 ^
      |                 ;
    7 |   f[0]=1;
      |   ~              
main.c:11:5: error: 'fi' undeclared (first use in this function); did you mean 'f'?
   11 |     fi[i]=fi[i-1]+fi[i-2];
      |     ^~
      |     f
main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   13 |   printf("%d\n",fi[n]);
      |   ^~~~~~
main.c:13:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:13:3: note: include '<stdio.h>' or provide a declaration of 'printf'