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

#nclude <stdio.h>
#include<math.h>
int main()
{
   long long int t,s fac=1;
   scanf(%lld,&t);

   for(s=t;s>=1;s--)
   {
       fac=fac*s;
   }
   printf("%lld"\n,fac);

   return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #nclude; did you mean #include?
    1 | #nclude <stdio.h>
      |  ^~~~~~
      |  include
main.c: In function 'main':
main.c:5:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fac'
    5 |    long long int t,s fac=1;
      |                      ^~~
main.c:6:4: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |    scanf(%lld,&t);
      |    ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include<math.h>
  +++ |+#include <stdio.h>
    3 | int main()
main.c:6:4: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |    scanf(%lld,&t);
      |    ^~~~~
main.c:6:4: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:10: error: expected expression before '%' token
    6 |    scanf(%lld,&t);
      |          ^
main.c:8:8: error: 's' undeclared (first use in this function)
    8 |    for(s=t;s>=1;s--)
      |        ^
main.c:8:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:8: error: 'fac' undeclared (first use in this function)
   10 |        fac=fac*s;
      |        ^~~
main.c:12:4: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   12 |    printf("%lld"\n,fac);
      |    ^~~~~~
main.c:12:4: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:4: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:12:4: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:17: error: stray '\' in program
   12 |    printf("%lld"\n,fac);
      |                 ^
main.c:12:17: error: expected ')' before 'n'
   12 |    printf("%lld"\n,fac);
      |          ~      ^~
      |                 )
Language: C

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

int main()
{
   long long int t,s fac=1;
   scanf(%lld,&t);

   for(s=t;s>=1;s--)
   {
       fac=fac*s;
   }
   printf("%lld"\n,fac);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fac'
    6 |    long long int t,s fac=1;
      |                      ^~~
main.c:7:10: error: expected expression before '%' token
    7 |    scanf(%lld,&t);
      |          ^
main.c:9:8: error: 's' undeclared (first use in this function)
    9 |    for(s=t;s>=1;s--)
      |        ^
main.c:9:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:8: error: 'fac' undeclared (first use in this function)
   11 |        fac=fac*s;
      |        ^~~
main.c:13:17: error: stray '\' in program
   13 |    printf("%lld"\n,fac);
      |                 ^
main.c:13:17: error: expected ')' before 'n'
   13 |    printf("%lld"\n,fac);
      |          ~      ^~
      |                 )
Language: C

#include<stdio.h>

int main()

{
    long int fact,i,n;

    fact=1;
    
    for(i=1; i<=n; i++){
        fact=fact*i;
    }

    printf("%ld\n",fact);

    }

    return 0;
}

Compiler output:
main.c:18:5: error: expected identifier or '(' before 'return'
   18 |     return 0;
      |     ^~~~~~
main.c:19:1: error: expected identifier or '(' before '}' token
   19 | }
      | ^
Language: C

#include<stdio.h>
#include<math.h>
int main()
{
    long long  i,n;
    long long rlt=1;

    scanf("%lld",&n);
    for(i=1;i<=n;i++){
            rslt*=i;

    }
    printf("%lld\n",rslt);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:13: error: 'rslt' undeclared (first use in this function); did you mean 'rlt'?
   10 |             rslt*=i;
      |             ^~~~
      |             rlt
main.c:10:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void)
{
	int n;
	int i;
	long sum;
	
	sum = 1;
	
	scanf("%d", &n);
	
	for (i = 1; i <= n; i++){
		sum *= i;
	}
		printf("%d\n", sum);
	}
	
	return (0);
}

Compiler output:
main.c:19:9: error: expected identifier or '(' before 'return'
   19 |         return (0);
      |         ^~~~~~
main.c:20:1: error: expected identifier or '(' before '}' token
   20 | }
      | ^
Language: C

include<stdio.h>
#include<inttypes.h>

int
main(int argc, char *argv[])
{
        uint_fast8_t i;
        uint_fast64_t a;

        scanf("%"SCNdFAST64, &a);
        for (i = a - 1; i > 0; i--)
                a *= i;
        printf("%"PRIdFAST64"\n", a);

        return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:10:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   10 |         scanf("%"SCNdFAST64, &a);
      |         ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include<inttypes.h>
  +++ |+#include <stdio.h>
    3 | 
main.c:10:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   10 |         scanf("%"SCNdFAST64, &a);
      |         ^~~~~
main.c:10:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:13:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   13 |         printf("%"PRIdFAST64"\n", a);
      |         ^~~~~~
main.c:13:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:13:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h> 

int main(){
 
  double n,i,kai;
  kai=1;
  scanf("%d",&n);

    for (i = 1; i <= n; i++) {
       kai = kai*i;   
    }
   

  printf("%d\n",int(kai));

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:17: error: expected expression before 'int'
   14 |   printf("%d\n",int(kai));
      |                 ^~~
Language: C

#include <stdio.h>
int main(void)
{
int n,fact=1,i;
scanf("%d",&n);
for(i=2;i<=n;i++)
fact=fact*i;
printf("%d",fact);
retrurn 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:1: error: 'retrurn' undeclared (first use in this function)
    9 | retrurn 0;
      | ^~~~~~~
main.c:9:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:8: error: expected ';' before numeric constant
    9 | retrurn 0;
      |        ^~
      |        ;
Language: C

#include<stdio.h>
int main(void){
   int n, i;
   long sum;
   scanf("%d", &n)
   for ( i = 1; i <= n; i++ ) {
      sum *= n;
   }
   printf("%ld", sum);
   return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:5:19: error: expected ';' before 'for'
    5 |    scanf("%d", &n)
      |                   ^
      |                   ;
    6 |    for ( i = 1; i <= n; i++ ) {
      |    ~~~
Language: C

#include<stdio.h>

int main()
{
    int n;
    unsigned long long f=1;
    scanf("%d",&n);
    for(n;n>=1;n--)
       {
          f=n*f;
       }
       printf("%lu\n",f);
  return 0;

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

Select Code
#include<stdio.h>

int main()
{
    unsigned long long int a,b=1;
    scanf("%llu",&a);
    for(a;a>=1;a--)
    {
        b=b*a;
    }
     
    printf("%llu\n",b);
    return 0;
}

Compiler output:
main.c:1:1: error: unknown type name 'Select'
    1 | Select Code
      | ^~~~~~
main.c:1:12: error: expected ';' before 'typedef'
    1 | Select Code
      |            ^
      |            ;
Language: C

#include<stdio.h>

int main(){
 int n;
 long ans;

 ans = 1;

 scanf("%d",&n);

 if(n==0){ans=1;}
 else{
 for(i=1;i<=n;i++)ans*=i;
 }
 printf("%ld",ans);

return 0;
}


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

#include <stdio.h>
int main(void){
   int n,i,P;
   P=1;
   n<=1&&n<=20
   scanf("%d",&n);
   for(i=1;i<=n;i++){
       P=P*i;
   }
   printf("%d\n",P);
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:15: error: expected ';' before 'scanf'
    5 |    n<=1&&n<=20
      |               ^
      |               ;
    6 |    scanf("%d",&n);
      |    ~~~~~
Language: C

#include <stdio.h>

int main(){
int i,n,k;
k=1;
scanf("%d",&n);
for(i=1;i<=n;i++){
k=k*i;
}
printf("%d\n",k);
returun 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:1: error: 'returun' undeclared (first use in this function)
   11 | returun 0;
      | ^~~~~~~
main.c:11:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:8: error: expected ';' before numeric constant
   11 | returun 0;
      |        ^~
      |        ;
Language: C

#include<stdio.h>
scanf("%d",&n);
int kaizi(int a){
if(a>0)
return (n*kaizi(n-1));
else
return 1;}
int main(){
int n;
scanf("%d",&n);
printf("%d",kaizi(n));
return 0;
}

Compiler output:
main.c:2:7: error: expected declaration specifiers or '...' before string constant
    2 | scanf("%d",&n);
      |       ^~~~
main.c:2:12: error: expected declaration specifiers or '...' before '&' token
    2 | scanf("%d",&n);
      |            ^
main.c: In function 'kaizi':
main.c:5:9: error: 'n' undeclared (first use in this function)
    5 | return (n*kaizi(n-1));
      |         ^
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int kaizi(int a){
if(a>0)
return (n*kaizi(n-1));
else
return 1;}
int main(){
int n;
scanf("%d",&n);
printf("%d",kaizi(n));
return 0;
}

Compiler output:
main.c: In function 'kaizi':
main.c:4:9: error: 'n' undeclared (first use in this function)
    4 | return (n*kaizi(n-1));
      |         ^
main.c:4:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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


int main(int argc,char *argv[]){
int cnt ,i,kaeru;
long long int num;
char total[10];
gets(total);
kaeru= atoi(total);
for( cnt = 1 ; cnt <=kaeru ; cnt++ ){

num = 1;
for( i = cnt ; i >= 1 ; i-- ){
num *= i;
}
printf("%d! = %lld\n", cnt, num);
}

}

Compiler output:
main.c: In function 'main':
main.c:9:1: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    9 | gets(total);
      | ^~~~
      | fgets
Language: C

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


int main(){
int cnt ,i,kaeru;
long long int num;
char total[10];
gets(total);
kaeru= atoi(total);
for( cnt = 1 ; cnt <=kaeru ; cnt++ ){

num = 1;
for( i = cnt ; i >= 1 ; i-- ){
num *= i;
}
printf("%d! = %lld\n", cnt, num);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:1: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    9 | gets(total);
      | ^~~~
      | fgets
Language: C

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

int i,n;
__int64 ans[25];

int main(){
	scanf("%d",&n);
	ans[1]=1;
	for(i=2;i<=n;i++)ans[i]=ans[i-1]*i;
	printf("%lld",ans[n]);
	return 0;
}

Compiler output:
main.c:5:1: error: unknown type name '__int64'; did you mean '__int64_t'?
    5 | __int64 ans[25];
      | ^~~~~~~
      | __int64_t
Language: C

#include<stdio.h>
main(){
  int n,sum=1;
  scanf ("%d",&n){
  while(n!=1){
    sum*=n;
    n--;
  }
  }
  printf("%d\n",sum);
  return 0;
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:4:18: error: expected ';' before '{' token
    4 |   scanf ("%d",&n){
      |                  ^
      |                  ;
Language: C

#include<stdio.h>
main(){
  int n,sum=1;
  scanf ("%d",&n)ツ；
  while(n!=1){
    sum*=n;
    n--;
  }
  }
  printf("%d\n",sum);
  return 0;
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:4:18: error: expected ';' before '\U000030c4\U0000ff1b'
    4 |   scanf ("%d",&n)ツ；
      |                  ^~~~
      |                  ;
main.c: At top level:
main.c:10:10: error: expected declaration specifiers or '...' before string constant
   10 |   printf("%d\n",sum);
      |          ^~~~~~
main.c:10:17: error: unknown type name 'sum'
   10 |   printf("%d\n",sum);
      |                 ^~~
main.c:11:3: error: expected identifier or '(' before 'return'
   11 |   return 0;
      |   ^~~~~~
main.c:12:1: error: expected identifier or '(' before '}' token
   12 | }
      | ^
Language: C

#include<stdio.h>
main(){
  int n,sum=1;
  scanf ("%d",&n);
  while(n!=1){
    sum*=n;
    n--;
  }
  }
  printf("%d\n",sum);
  return 0;
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c:10:10: error: expected declaration specifiers or '...' before string constant
   10 |   printf("%d\n",sum);
      |          ^~~~~~
main.c:10:17: error: unknown type name 'sum'
   10 |   printf("%d\n",sum);
      |                 ^~~
main.c:11:3: error: expected identifier or '(' before 'return'
   11 |   return 0;
      |   ^~~~~~
main.c:12:1: error: expected identifier or '(' before '}' token
   12 | }
      | ^
Language: C

n;gets();main(){n=!printf("%.f\n",tgamma(atoi(gets())+1));}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n;gets();main(){n=!printf("%.f\n",tgamma(atoi(gets())+1));}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: warning: data definition has no type or storage class
    1 | n;gets();main(){n=!printf("%.f\n",tgamma(atoi(gets())+1));}
      |   ^~~~
main.c:1:3: error: type defaults to 'int' in declaration of 'gets' [-Wimplicit-int]
main.c:1:10: error: return type defaults to 'int' [-Wimplicit-int]
    1 | n;gets();main(){n=!printf("%.f\n",tgamma(atoi(gets())+1));}
      |          ^~~~
main.c: In function 'main':
main.c:1:20: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | n;gets();main(){n=!printf("%.f\n",tgamma(atoi(gets())+1));}
      |                    ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | n;gets();main(){n=!printf("%.f\n",tgamma(atoi(gets())+1));}
main.c:1:20: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    1 | n;gets();main(){n=!printf("%.f\n",tgamma(atoi(gets())+1));}
      |                    ^~~~~~
main.c:1:20: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:35: error: implicit declaration of function 'tgamma' [-Wimplicit-function-declaration]
    1 | n;gets();main(){n=!printf("%.f\n",tgamma(atoi(gets())+1));}
      |                                   ^~~~~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'tgamma'
  +++ |+#include <math.h>
    1 | n;gets();main(){n=!printf("%.f\n",tgamma(atoi(gets())+1));}
main.c:1:35: warning: incompatible implicit declaration of built-in function 'tgamma' [-Wbuiltin-declaration-mismatch]
    1 | n;gets();main(){n=!printf("%.f\n",tgamma(atoi(gets())+1));}
      |                                   ^~~~~~
main.c:1:35: note: include '<math.h>' or provide a declaration of 'tgamma'
main.c:1:42: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
    1 | n;gets();main(){n=!printf("%.f\n",tgamma(atoi(gets())+1));}
      |                                          ^~~~
Language: C

n;main(){scanf("%d",&n);n=!printf("%.f\n",tgammma(n+1));}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n;main(){scanf("%d",&n);n=!printf("%.f\n",tgammma(n+1));}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
    1 | n;main(){scanf("%d",&n);n=!printf("%.f\n",tgammma(n+1));}
      |   ^~~~
main.c: In function 'main':
main.c:1:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | n;main(){scanf("%d",&n);n=!printf("%.f\n",tgammma(n+1));}
      |          ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | n;main(){scanf("%d",&n);n=!printf("%.f\n",tgammma(n+1));}
main.c:1:10: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | n;main(){scanf("%d",&n);n=!printf("%.f\n",tgammma(n+1));}
      |          ^~~~~
main.c:1:10: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:28: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | n;main(){scanf("%d",&n);n=!printf("%.f\n",tgammma(n+1));}
      |                            ^~~~~~
main.c:1:28: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:28: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:28: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:43: error: implicit declaration of function 'tgammma' [-Wimplicit-function-declaration]
    1 | n;main(){scanf("%d",&n);n=!printf("%.f\n",tgammma(n+1));}
      |                                           ^~~~~~~
Language: C

#include<stdio.h>
typedef long long ll;
ll func(ll);
ll memo[21];

int main(void){
  ll x,i;
for(i=0;2<21;i++)
memo[n]=0;
  scanf("%lld",&x);
  printf("%lld\n",func(x));
  return 0;
}

ll func(ll n){

  if(n==0)return 1;
  if(memo[n]!=0)return memo[n];
  return memo[n]=n * func(n-1);
}

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

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(void){
	char*(*f)(char*) = gets;
	char s[20];
	f(s);
	printf("%.f\n",tgamma(atoi(s)+1));
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:28: error: 'gets' undeclared (first use in this function); did you mean 'fgets'?
    5 |         char*(*f)(char*) = gets;
      |                            ^~~~
      |                            fgets
main.c:5:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C

import java.io.*;

class Main{	
public static void main(String[] args)
			throws java.io.IOException{
		 BufferedReader d = new BufferedReader(new InputStreamReader(System.in));
		String n=d.readLine();
		System.out.print(fact(Integer.parseInt(n)));
		// TODO 自動生成されたメソッド・スタブ
		
	}
	
	public static int fact(int n){
		if(n==0) return 1;
		return n*fact(n-1);
		
	}
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.io.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.io.*;
      |            ^
main.c:3:1: error: unknown type name 'class'
    3 | class Main{
      | ^~~~~
main.c:3:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    3 | class Main{
      |           ^
Language: C

import java.io.*;
import java.math.*;
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args)
			throws java.io.IOException{
		 BufferedReader d = new BufferedReader(new InputStreamReader(System.in));
		String n=d.readLine();
		System.out.println(fact(Integer.parseInt(n)));
		// TODO 自動生成されたメソッド・スタブ
		
	}
	
	public static long fact(int n){
		if(n==0) return 1;
		return n*fact(n-1);
		
	}

}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.io.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.io.*;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.math.*;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.math.*;
      |            ^
main.c:3:1: error: unknown type name 'public'
    3 | public class Main {
      | ^~~~~~
main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    3 | public class Main {
      |              ^~~~
Language: C

include <stdio.h>

int main() {
  long m=1,n;
  scanf("%ld",&n);
  while(n>1)m=m*n--;
  printf("%ld\n",m);
  return 0;
}

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

include <stdio.h>

int main() {
  long n,o=1;
  scanf("%ld",&n);
  while(n>1)o=o*n--;
  printf("%ld\n",o);
  return 0;
}

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

#include<stdio.h>int main(void){int n,i,out=1;scanf("%d",&n);for(i=1;i<=n;i++)out=out*i;printf("%d",out);return 0:}

Compiler output:
main.c:1:18: warning: extra tokens at end of #include directive
    1 | #include<stdio.h>int main(void){int n,i,out=1;scanf("%d",&n);for(i=1;i<=n;i++)out=out*i;printf("%d",out);return 0:}
      |                  ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include <stdio.h>
#include <math.h>
int main()
{
	int n;
	int result=1;
	while(1){
		scanf("%d",&n);
		if(1<=n<=20){
			break;
	}
	for(n=n; n>=1; n--){
		result*=n;
	}
	printf("%d\n",result);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:1: error: expected declaration or statement at end of input
   17 | }
      | ^
Language: C

#include<stdio.h>
#include<math.h>
int main(void){
    long long int a=1;
    int n,i;
    scanf("%d",n);
    for(i=2; i<=n; i++;){
        a*=i;
    }
    printf("%lld\n",a);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:23: error: expected ')' before ';' token
    7 |     for(i=2; i<=n; i++;){
      |        ~              ^
      |                       )
Language: C


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

Compiler output:
main.c:2:1: error: expected identifier or '(' before '}' token
    2 | }
      | ^
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |         scanf("%d",&n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | 
main.c:5:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |         scanf("%d",&n);
      |         ^~~~~
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:13: error: implicit declaration of function 'fact' [-Wimplicit-function-declaration]
    6 |         r = fact(n);
      |             ^~~~
main.c:7:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |         printf("%d\n",r);
      |         ^~~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
int main(){
int num;
scanf("%d",&num);
int i=1,result=1;
for(;i<=n;i++)
    result*=i;
printf("%d\n",result);
return 0;
}

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

#include<stdio.h>
int main()
{
  int i,n;
  scanaf("%d",&n);
    for(i=1;i<=n;i++)
  {
    n=n*i;
     printf("d",n);
 }

Compiler output:
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'scanaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |   scanaf("%d",&n);
      |   ^~~~~~
      |   scanf
main.c:10:2: error: expected declaration or statement at end of input
   10 |  }
      |  ^
Language: C

#include <iostream>
using namespace std;

int main()
{
    int num, fact=1;
    
    cin >> num;
    
    for(int j=1 ; j<=num; j++)
    {
                    fact *= j;
    }
    
    cout << "\n\nThe factorial of " << num << " is " << fact << endl;
    cout <<"\n";
    
    return 0;
}

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

#include<iostream>

using namespace std;
int f(int n)
{
    
    if ( n == 1) return 1;
    if ( n == 2) return 2;
    
    return n * f(n-1);
    
}
int main()
{
    f(5);
 return 0;   
}

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

#include <iostream>
using namespace std;

long long fact(int n)
{
    if(n==1)
        return 1;
    if(n==2)
        return 2;

    return n*fact(n-1);
}

int main()
{
    int n;

    cin >> n;
    cout << fact(n) << endl;

    return 0;
}

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

#include<iostream>

using namespace std;

int main()

{

    int num,factorial=1;

    cin>>num;

    for(int a=1;a<=num;a++)

    {

        factorial=factorial*a;

    }
cout<<factorial;

    return 0;

}

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

#include<cstdio>
using namespace std;
int main ()
{
	int n,s=1;
	scanf("%d",&n);
	for(int i=n;i>=1;i--)
	{
	s=s*i; 
	}
	printf("%d",s);
	 
} 

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

#include <cstdio>

long long fac(int a)
{
	if(a==0)return (long long)1;
	else return (long long)a * fac(a - 1) ;
} 
int main()
{
	int n;
	scanf("%d",&n);
	printf("%lld\n",fac(n));
}

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

#include <iostream>
int fact(int n);
using namespace std;

int main ()
{

int m; 
int factoriel;


cout<<"Enter number: ";
cin>>m;

factoriel=fact(m);

cout<<""<<factoriel<<endl;
cin.get(); 
cin.get();

return 0;
}

int fact(int n) {

int fact=1;
int i;

for (i=1; i<=n; i++)
fact*=i;

return fact;
}

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

#include<stdio.h>

typedef unsigned long long long ULONG;

void func_fact(int n, ULONG *result);
main()
{
	int input = 0;
	ULONG result = 1;
	scanf("%d", &input);
	func_fact(input, &result);
	printf("%ld\n", result);
	return 0;
}
void func_fact(int n, ULONG *result)
{
	static int i = 1;
	*result = *result * i;
	i++;
	
	if(i > n)
	{
		return;
	}
	else
	{
		func_fact(n, result);
	}
}

Compiler output:
main.c:3:28: error: 'long long long' is too long for GCC
    3 | typedef unsigned long long long ULONG;
      |                            ^~~~
main.c:6:1: error: return type defaults to 'int' [-Wimplicit-int]
    6 | main()
      | ^~~~
Language: C

#include<stdio.h>
#include<conio.h>
void main()
{
    int n;
    float sum,i;
    sum=1;
    i=1;
 
    scanf("%d",&n);
    if(n<=20)
    {
        while(i<=n)
        {
            sum=sum*i;
            i=i+1;
        }
        printf("%f",sum);
       


    }
       getch();
  
}

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<conio.h>
int main()
{
    int n;
    float sum,i;
    sum=1;
    i=1;
 
    scanf("%d",&n);
    if(n<=20)
    {
        while(i<=n)
        {
            sum=sum*i;
            i=i+1;
        }
        printf("%f",sum);
       


    }
       getch();
     return o;
  
}

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<conio.h>
int main()
{
    int n;
    float sum,i;
    sum=1;
    i=1;

    scanf("%d",&n);
    if(n<=20)
    {
        while(i<=n)
        {
            sum=sum*i;
            i=i+1;
        }
        printf("%.0f",sum);



    }
    getch();
    return 0;



}

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<conio.h>
int main()
{
    int n,i=1;
    long long int sum;
    sum=1;
    i=1;

    scanf("%d",&n);
    if(n<=20)
    {
        while(i<=n)
        {
            sum=sum*i;
            i=i+1;
        }
        printf("%lld",sum);



    }
    getch();
    return 0;



}

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<conio.h>
int main()
{
    int n,i=1;
    long long int sum;
    sum=1;
    i=1;
    printf("\n\n");

    scanf("%d",&n);
    if(n<=20)
        {while(i<=n)
        {
            sum=sum*i;
            i=i+1;
        }

     printf("\n\n%lld",sum);
        }
     else
        printf(" ");



    getch();
    return 0;
}

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<conio.h>
int main()
{
    int n,i=1;
    long long  sum;
    sum=1;
    i=1;


    scanf("%d",&n);
    if(n<=20)
        {while(i<=n)
        {
            sum=sum*i;
            i=i+1;
        }
         printf("%lld",sum);


        }
        getch();
    return 0;
}

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<conio.h>
int main()
{
    int i,n,f;
    while(scanf("%d",&n)!=EOF){
        f=1;
    for(i=1;i<=n;i++)
        f=f*i;
 printf("%d\n",f);
}
getch();
return 0;
}

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int fact (int n) {
	if(n==0) return 1;
	else return i*fact(n-1);
}

int main(void) {
	int i;
	
	scanf("%d", &i);
	printf("%d", fact(i));
	
	return 0;
}

Compiler output:
main.c: In function 'fact':
main.c:5:21: error: 'i' undeclared (first use in this function)
    5 |         else return i*fact(n-1);
      |                     ^
main.c:5:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(){
    double n, ans = 1;
    int i;
    scanf("%lf",&n);
    for(i=1; i<=n; i++)
        ans *= i;
    printf("%0.f\n, ans);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:12: warning: missing terminating " character
    8 |     printf("%0.f\n, ans);
      |            ^
main.c:8:12: error: missing terminating " character
    8 |     printf("%0.f\n, ans);
      |            ^~~~~~~~~~~~~~
main.c:10:5: error: expected expression before 'return'
   10 |     return 0;
      |     ^~~~~~
main.c:10:14: error: expected ';' before '}' token
   10 |     return 0;
      |              ^
      |              ;
   11 | }
      | ~
Language: C++

#include<iostream>
using namespace std;

int main() {
	int n, sum = 1;
	cin >> n;
	for (int i = 1;i <= n;i++) {
		sum = sum * i;
	}
	cout << sum << endl;

	return 0;



Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: expected '}' at end of input
   12 |         return 0;
      |                  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
 int n;
 cin >> n;
 long long int ans;
 for(int i=1; i<=n; int i++) ans *= i;

 cout << ans << '\n';

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: expected primary-expression before 'int'
    9 |  for(int i=1; i<=n; int i++) ans *= i;
      |                     ^~~
a.cc:9:20: error: expected ')' before 'int'
    9 |  for(int i=1; i<=n; int i++) ans *= i;
      |     ~              ^~~~
      |                    )
a.cc:9:26: error: expected initializer before '++' token
    9 |  for(int i=1; i<=n; int i++) ans *= i;
      |                          ^~
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int n;
	
	cin >> n
		int total=1;
	
		for(int i = 1; i <= n; i++){
			total *= i;
		}
	
		cout << total << endl;
	
	return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before 'int'
    8 |         cin >> n
      |                 ^
      |                 ;
    9 |                 int total=1;
      |                 ~~~
a.cc:12:25: error: 'total' was not declared in this scope
   12 |                         total *= i;
      |                         ^~~~~
a.cc:15:25: error: 'total' was not declared in this scope
   15 |                 cout << total << endl;
      |                         ^~~~~
Language: C++

#include<stdio.h>
void main()
{
int a,b=1;
clrscr();
printf("Please enter any number to find its factorial\n");
scanf("%d",&a);
while(a>1)
{
b=b*a;
a--;
}
printf("factorial is %d",b);
getch();
}

Compiler output:
a.cc:2:1: error: '::main' must return 'int'
    2 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'clrscr' was not declared in this scope
    5 | clrscr();
      | ^~~~~~
a.cc:14:1: error: 'getch' was not declared in this scope; did you mean 'getc'?
   14 | getch();
      | ^~~~~
      | getc
Language: C++

import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		long x = 1;
		for (int i = 2; i <= n; i++) {
			x = x * i;
		}
		System.out.println(x);
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

import java.util.Scanner;
 
public class main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		long x = 1;
		for (int i = 2; i <= n; i++) {
			x = x * i;
		}
		System.out.println(x);
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class main {
      | ^~~~~~
Language: C++

import java.util.Scanner;

public class main {
       public static void main(String[] args) {
              Scanner scn = new Scanner(System.in);
              int n = scn.nextInt();
              long x = 1;
              for (int i = 2; i <= n; i++) {
                       x = x * i;
		}
		System.out.println(x);
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class main {
      | ^~~~~~
Language: C++

#include<iostream>

using namesapce std;

int main(){
int x;
cin>>x;
long long ans=1;
for(int i=1;i<=x;i++)ans*=i;
cout<<ans<<endl;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namesapce'
    3 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 | cin>>x;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 | cout<<ans<<endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 | cout<<ans<<endl;
      |            ^~~~
      |            std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<string>
#include <stdio.h>
#include <math.h>
#include <cctype>
#include<queue>
#include<stack>
#include<cstdio>
using namespace std;
int main(){
	long long int ans;
	int n;
	cin>>n;
	ans=1;
	for(int i=1;i<=n;i++){
		ans*=i;
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope
   12 |         cin>>n;
      |         ^~~
a.cc:8:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    7 | #include<cstdio>
  +++ |+#include <iostream>
    8 | using namespace std;
a.cc:17:9: error: 'cout' was not declared in this scope
   17 |         cout<<ans<<endl;
      |         ^~~~
a.cc:17:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:20: error: 'endl' was not declared in this scope
   17 |         cout<<ans<<endl;
      |                    ^~~~
a.cc:8:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    7 | #include<cstdio>
  +++ |+#include <ostream>
    8 | using namespace std;
Language: C++

print(["1","1","2","6","24","120","720","5040","40320","362880","3628800","39916800","479001600","6227020800","87178291200","1307674368000","20922789888000","355687428096000","6402373705728000","121645100408832000","2432902008176640000","51090942171709440000"][int(input())])

Compiler output:
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token
    1 | print(["1","1","2","6","24","120","720","5040","40320","362880","3628800","39916800","479001600","6227020800","87178291200","1307674368000","20922789888000","355687428096000","6402373705728000","121645100408832000","2432902008176640000","51090942171709440000"][int(input())])
      |      ^
Language: C++

#include <iostream>
using namespace std;

int main () {
    int n, a=1,i;
    cin >> n:
    for(i=n;i>1;i--) {
        a *= n;
    }
    cout << a << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected ';' before ':' token
    6 |     cin >> n:
      |             ^
      |             ;
a.cc:7:20: error: expected ';' before ')' token
    7 |     for(i=n;i>1;i--) {
      |                    ^
      |                    ;
Language: C++

#include <iostream>

int main(){
long long int ans = 1;
int n;
cin >> n;
for(int i=1; i<=n; i++)
ans*=i;
cout << ans << endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 | cin >> n;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 | cout << ans << endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 | cout << ans << endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

void factorial(int n) {
    int answer = 1;

    for (int i = n; i != 0; i--) {
            answer *= i;
    }

    cout << answer << endl;
}

Compiler output:
a.cc: In function 'void factorial(int)':
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << answer << endl;
      |     ^~~~
a.cc:8:23: error: 'endl' was not declared in this scope
    8 |     cout << answer << endl;
      |                       ^~~~
Language: C++

int factorial(int n) {
    int answer = 1;

    for (int i = n; i != 0; i--) {
            answer *= i;
    }

    std::cout << answer << std::endl;
}

Compiler output:
a.cc: In function 'int factorial(int)':
a.cc:8:10: error: 'cout' is not a member of 'std'
    8 |     std::cout << answer << std::endl;
      |          ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int factorial(int n) {
a.cc:8:33: error: 'endl' is not a member of 'std'
    8 |     std::cout << answer << std::endl;
      |                                 ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int factorial(int n) {
a.cc:9:1: warning: no return statement in function returning non-void [-Wreturn-type]
    9 | }
      | ^
Language: C++

#include <iostream>

using namespace std;

int main(int argc, *char argv[]) {
    int answer = 1;
    int n = argv[1];

    for (int i = n; i != 0; i--) {
            answer *= i;
    }
cout << answer;
return 0;
}

Compiler output:
a.cc:5:20: error: expected identifier before '*' token
    5 | int main(int argc, *char argv[]) {
      |                    ^
a.cc:5:21: error: expected ',' or '...' before 'char'
    5 | int main(int argc, *char argv[]) {
      |                     ^~~~
a.cc:5:5: warning: second argument of 'int main(int, int*)' should be 'char **' [-Wmain]
    5 | int main(int argc, *char argv[]) {
      |     ^~~~
a.cc: In function 'int main(int, int*)':
a.cc:7:13: error: 'argv' was not declared in this scope; did you mean 'argc'?
    7 |     int n = argv[1];
      |             ^~~~
      |             argc
Language: C++

#include <iostream>

using namespace std;

int main() {
    long long answer = 1`;
    int n;
    cin >> n;

    for (int i = n; i != 0; i--) {
            answer *= i;
    }
cout << answer;
return 0;
}

Compiler output:
a.cc:6:25: error: stray '`' in program
    6 |     long long answer = 1`;
      |                         ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int n;
	int i;
	int anser = 1;
	
	cin >> n
	
	for (i = 1; i <= n; i++){
		anser *= i;
	}
	
	cout << anser;
	
	return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected ';' before 'for'
   10 |         cin >> n
      |                 ^
      |                 ;
   11 | 
   12 |         for (i = 1; i <= n; i++){
      |         ~~~      
a.cc:12:32: error: expected ';' before ')' token
   12 |         for (i = 1; i <= n; i++){
      |                                ^
      |                                ;
Language: C++

main = readLn >>= print . product . flip take [1..]

Compiler output:
a.cc:1:48: error: too many decimal points in number
    1 | main = readLn >>= print . product . flip take [1..]
      |                                                ^~~
a.cc:1:1: error: 'main' does not name a type
    1 | main = readLn >>= print . product . flip take [1..]
      | ^~~~
Language: C++

#include <cstdio>

int main(void)
{
	int n;
	int i;
	long sum;
	
	sum = 1;
	
	scanf("%d", &n);
	
	for (i = 1; i <= n; i++){
		sum *= i;
	}
		printf("%d\n", sum);
	}
	
	return (0);
}

Compiler output:
a.cc:19:9: error: expected unqualified-id before 'return'
   19 |         return (0);
      |         ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int n;
	long long int ans = 1;
	int num;

	cin >> n;

	for(int i = n+1; i>1; i--)
	{
		ans *= (i-1);
	}

	cout << ans << endl

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:28: error: expected ';' before 'return'
   17 |         cout << ans << endl
      |                            ^
      |                            ;
   18 | 
   19 |         return 0;
      |         ~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int n
  long long ans;
  cin >> n;
  ans = 1;
  for (int i = 1; i <= n; i++){
    ans *= i;
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'long'
    7 |   long long ans;
      |   ^~~~
a.cc:8:10: error: 'n' was not declared in this scope
    8 |   cin >> n;
      |          ^
a.cc:9:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   ans = 1;
      |   ^~~
      |   abs
Language: C++

import scala.io.StdIn._
object Main extends App { println((1 to readInt()).map(_.toLong).product) }

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import scala.io.StdIn._
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<iostream>
#include<stdio.h>

using namespace std;

int factorial(int n) {

	return (n > 0 ? n*factorial(n - 1) : 1);

}

int main() {
	int n;
	scanf_s("%d", &n);
	
	printf("%d \n", factorial(n));

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   14 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<iostream>
#include<stdio.h>

using namespace std;

long long factorial(int n) {

	return (n > 0 ? n*factorial(n - 1) : 1);

}

int main() {
	int  n;
	scanf_s("%d", &n);
	
	printf("%lld \n", factorial(n));

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   14 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <stdio.h>

int main(){
	int n;
	int i;
	long long ans=1;

	cin >> n;
	for(i=0; i<n; i++){
		ans = ans * (i+1);
	}
	cout << ans <<endl;
	
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> n;
      |         ^~~
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout << ans <<endl;
      |         ^~~~
a.cc:12:23: error: 'endl' was not declared in this scope
   12 |         cout << ans <<endl;
      |                       ^~~~
Language: C++

#include <stdio.h>

int main(){
	int n;
	int i;
	long long ans=1;

	cin >> n;
	for(i=0; i<n; i++){
		ans = ans * (i+1);
	}
	cout << ans << endl;

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> n;
      |         ^~~
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout << ans << endl;
      |         ^~~~
a.cc:12:24: error: 'endl' was not declared in this scope
   12 |         cout << ans << endl;
      |                        ^~~~