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

#include <iostream>
using namespace std;

int main()
{
int result;
string number;
while(true)
{
result = 0;
cin>>number;
if(number=="0") break;
for(int i=0; i<number.size; i++)
{
cin>>a[i];
}
for(int i=number; i>=1; i--)
{
result += a[i] - '0';
}
cout<<result<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   13 | for(int i=0; i<number.size; i++)
      |                ~~~~~~~^~~~
      |                           ()
a.cc:15:6: error: 'a' was not declared in this scope
   15 | cin>>a[i];
      |      ^
a.cc:17:11: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in initialization
   17 | for(int i=number; i>=1; i--)
      |           ^~~~~~
      |           |
      |           std::string {aka std::__cxx11::basic_string<char>}
a.cc:19:11: error: 'a' was not declared in this scope
   19 | result += a[i] - '0';
      |           ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
int result;
string number;
while(true)
{
result = 0;
cin>>number;
if(number=="0") break;
for(int i=0; i<number.size; i++)
{
cin>>a[i];
}
for(int i=number; i>=1; i--)
{
result += a[i] - '0';
}
cout<<result<<endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   13 | for(int i=0; i<number.size; i++)
      |                ~~~~~~~^~~~
      |                           ()
a.cc:15:6: error: 'a' was not declared in this scope
   15 | cin>>a[i];
      |      ^
a.cc:17:11: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in initialization
   17 | for(int i=number; i>=1; i--)
      |           ^~~~~~
      |           |
      |           std::string {aka std::__cxx11::basic_string<char>}
a.cc:19:11: error: 'a' was not declared in this scope
   19 | result += a[i] - '0';
      |           ^
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

include<iostream>
include<cstring>
using namespace std;
int main(){
char c[5];
int ans;
while(cin>>c){
if(c[0]=='0') break;
ans = 0;
for(int i=0;i<strlen(c);i++) ans += c-'0';
cout << ans << endl;
}
return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:7: error: 'cin' was not declared in this scope
    7 | while(cin>>c){
      |       ^~~
a.cc:10:15: error: 'strlen' was not declared in this scope
   10 | for(int i=0;i<strlen(c);i++) ans += c-'0';
      |               ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | include<iostream>
a.cc:10:34: error: invalid conversion from 'char*' to 'int' [-fpermissive]
   10 | for(int i=0;i<strlen(c);i++) ans += c-'0';
      |                              ~~~~^~~~~~~~
      |                                  |
      |                                  char*
a.cc:11:1: error: 'cout' was not declared in this scope
   11 | cout << ans << endl;
      | ^~~~
a.cc:11:16: error: 'endl' was not declared in this scope
   11 | cout << ans << endl;
      |                ^~~~
Language: C++

include<iostream>
include<cstring>
using namespace std;
int main(){
char c[1001];
int ans;
while(cin>>c){
if(c[0]=='0') break;
ans = 0;
for(int i=0;i<strlen(c);i++) ans += c[i]-'0';
cout << ans << endl;
}
return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:7: error: 'cin' was not declared in this scope
    7 | while(cin>>c){
      |       ^~~
a.cc:10:15: error: 'strlen' was not declared in this scope
   10 | for(int i=0;i<strlen(c);i++) ans += c[i]-'0';
      |               ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | include<iostream>
a.cc:11:1: error: 'cout' was not declared in this scope
   11 | cout << ans << endl;
      | ^~~~
a.cc:11:16: error: 'endl' was not declared in this scope
   11 | cout << ans << endl;
      |                ^~~~
Language: C++

include<iostream>
include<cstring>
using namespace std;
int main(){
char c[1001];
int ans;
while(cin>>c){
if(c[0]=='0') break;
ans = 0;
for(int i=0;i<strlen(c);i++) ans += (c[i]-'0');
cout << ans << endl;
}
return 0;
} 

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:7: error: 'cin' was not declared in this scope
    7 | while(cin>>c){
      |       ^~~
a.cc:10:15: error: 'strlen' was not declared in this scope
   10 | for(int i=0;i<strlen(c);i++) ans += (c[i]-'0');
      |               ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | include<iostream>
a.cc:11:1: error: 'cout' was not declared in this scope
   11 | cout << ans << endl;
      | ^~~~
a.cc:11:16: error: 'endl' was not declared in this scope
   11 | cout << ans << endl;
      |                ^~~~
Language: C++

#include <iostream>

int main(void)
{
	char c;
	int sum = 0, nChars = 0;
	
	while(cin >> c)
	{
		if(c == '\n')
		{
			if(nChars == 1 && sum == 0) break;
			else std::cout << sum << std::endl;
			sum = 0;
		}
		sum += c - '0';
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         while(cin >> c)
      |               ^~~
      |               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
      |                  ^~~
Language: C++

#include <iostream>

int main(void)
{
	char c;
	int sum = 0, nChars = 0;
	
lp0:
	std::cin >> c;
	if(c == '\n')
	{
		if(nChars == 1 && sum == 0) goro elp0;
		else std::cout << sum << std::endl;
		sum = 0;
		nChars = 0;
	}
	else
	{
		sum += c - 0x30;
		nChars++;
	}
	goto lp0;
elp0:
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:45: error: 'goro' was not declared in this scope
   12 |                 if(nChars == 1 && sum == 0) goro elp0;
      |                                             ^~~~
Language: C++

#include <stdio.h>
 
int main(){
    char arr[1100]= "";
    int i,sum;
    gets(arr);
	/*for(i=0;i<11;i++){
		printf("%d\n",arr[i]);
	}*/
    do {
        sum = 0;
        for(i=0;i<11;i++){
            if(arr[i]==0){
                break;
            }
            else{
                sum+= arr[i] - '0';
		//printf("sum = %d\n", sum);
                
            }
        }
        printf("%d\n",sum);
	arr[1100]= "";
        gets(arr);
	/*for(i=0;i<11;i++){
		printf("%d\n",arr[i]);
	}*/
    }while(!(arr[0]==48&&arr[1]==0));
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |     gets(arr);
      |     ^~~~
      |     getw
a.cc:23:20: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   23 |         arr[1100]= "";
      |                    ^~
      |                    |
      |                    const char*
Language: C++

#include <string>
#include<iostream>
using namespace std;
 
int main(){
while(1){
    string numb;
    int num=0;

    cin>>numb;
if(numb='0')break;


for(int i=0;i<length(numb);i++){    num+=numb[i]-'0';
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: could not convert 'numb.std::__cxx11::basic_string<char>::operator=(48)' from 'std::__cxx11::basic_string<char>' to 'bool'
   11 | if(numb='0')break;
      |    ~~~~^~~~
      |        |
      |        std::__cxx11::basic_string<char>
a.cc:14:15: error: 'length' was not declared in this scope
   14 | for(int i=0;i<length(numb);i++){    num+=numb[i]-'0';
      |               ^~~~~~
Language: C++

#include <string>
#include<iostream>
using namespace std;
 
int main(){
while(1){
    string numb;
    int num=0;

    cin>>numb;
if(numb='0')break;


for(int i=0;i<4;i++){    num+=numb[i]-'0';
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: could not convert 'numb.std::__cxx11::basic_string<char>::operator=(48)' from 'std::__cxx11::basic_string<char>' to 'bool'
   11 | if(numb='0')break;
      |    ~~~~^~~~
      |        |
      |        std::__cxx11::basic_string<char>
Language: C++

#include <string>
#include<iostream>
using namespace std;
 
int main(){
while(1){
    string numb;
    int num=0;

    cin>>numb;

if(numb='0')break;


for(int i=0;i<4;i++){    num+=numb[i]-'0';
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: could not convert 'numb.std::__cxx11::basic_string<char>::operator=(48)' from 'std::__cxx11::basic_string<char>' to 'bool'
   12 | if(numb='0')break;
      |    ~~~~^~~~
      |        |
      |        std::__cxx11::basic_string<char>
Language: C++

#include <string>
#include<iostream>
using namespace std;
 
int main(){
while(1){
    string numb;
    int num==0;

    cin>>numb;
if(numb='0')break;


for(int i=0;i<4;i++){    num+=numb[i]-'0';
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected initializer before '==' token
    8 |     int num==0;
      |            ^~
a.cc:11:8: error: could not convert 'numb.std::__cxx11::basic_string<char>::operator=(48)' from 'std::__cxx11::basic_string<char>' to 'bool'
   11 | if(numb='0')break;
      |    ~~~~^~~~
      |        |
      |        std::__cxx11::basic_string<char>
a.cc:14:26: error: 'num' was not declared in this scope; did you mean 'numb'?
   14 | for(int i=0;i<4;i++){    num+=numb[i]-'0';
      |                          ^~~
      |                          numb
Language: C++

package net.exkazuu;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String [] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			while(true) {
				String str = br.readLine();
				if(str == "0")
					break;
				
				int ans = 0;
				for(int i = 0; i < str.length(); i++) {
					ans += str.charAt(i)-'0';
				}
				System.out.println(ans);
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package net.exkazuu;
      | ^~~~~~~
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.io.IOException;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: expected unqualified-id before 'public'
    7 | public class Main {
      | ^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
int x,ans=0;
while(1){
cin>>x;
if(x==0);
while(x>0){
ans+=x%10;
x=x/10;
}
cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include<iostream>
#include<string.h>
using namespace std;
int main()
{
    char a[1000];int l,i,s;
    while(gets(a))
    {
        l=strlen(a);
        if(l==1 &a[0]=='0')break;
        s=0;
        for(i=0;i<l;i++)
        {
            s+=a[i]-'0';
        }
        cout<<s<<endl;

    }



    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |     while(gets(a))
      |           ^~~~
      |           getw
Language: C++

#include <stdio.h>

int main(void)
{
    int a=0,sum=0,a1,a2,a3,a4;
    while(1){
        a=0;sum=0;
        scanf("%d",&a);
        if(a==0)break;
        a1=a/1000%10;
        a2=a/100%10;
        a3=a/10%10;
        a4=a%10;
        sum=a1+a2+a3+a4;
        printf("%d\n",sum);
    }
    return 0;
}
    
    return 0;
}

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

incled <stdio.h>

void main(){

    int i,ans;
    char number[1001];
    scanf("%s",number);

    if(number[0]=0) return 0;

    for(i=0;i<1000;i++){
        ans += number[i];
    }
    printf("%d",ans);

}

Compiler output:
a.cc:1:1: error: 'incled' does not name a type
    1 | incled <stdio.h>
      | ^~~~~~
Language: C++

include <stdio.h>

void main(){

    int i,ans;
    char number[1001];
    scanf("%s",number);

    if(number[0]=0) return 0;

    for(i=0;i<1000;i++){
        ans += number[i];
    }
    printf("%d",ans);

}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio.h>
      | ^~~~~~~
Language: C++

#include <stdio.h>

Int main(void){
    Int ans,i;
    Char number[1001];
    While(1){
        ans=0;
        For(i=0;i<1000;i++){
            ans+=i;
        }
        if(ans=0) retern 0;
        printf("%d\n",ans)
    }
}

Compiler output:
a.cc:3:1: error: 'Int' does not name a type; did you mean 'int'?
    3 | Int main(void){
      | ^~~
      | int
Language: C++

#include <stdio.h>

int main(void){
    int ans,i;
    char number[1001];
    while(1){
        ans=0;
        for(i=0;i<1000;i++){
            ans+=i;
        }
        if(ans=0) retern 0;
        printf("%d\n",ans)
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'retern' was not declared in this scope; did you mean 'extern'?
   11 |         if(ans=0) retern 0;
      |                   ^~~~~~
      |                   extern
a.cc:12:27: error: expected ';' before '}' token
   12 |         printf("%d\n",ans)
      |                           ^
      |                           ;
   13 |     }
      |     ~
Language: C++

#include <stdio.h>

int main(void){
    int ans,i;
    char number[1001];
    while(1){
        ans=0;
        for(i=0;i<1000;i++){
            ans+=i;
        }
        if(ans=0) return 0;
        printf("%d\n",ans)
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: expected ';' before '}' token
   12 |         printf("%d\n",ans)
      |                           ^
      |                           ;
   13 |     }
      |     ~
Language: C++

#include <stdio.h>

int main(void){
    int ans,i;
    char number[1001];
    while(1){
        ans=0;
        scanf("%s",number)
        for(i=0;i<1000;i++){
            ans+=number[i];
        }
        if(ans=0) retern 0;
        printf("%d\n",ans)
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: expected ';' before 'for'
    8 |         scanf("%s",number)
      |                           ^
      |                           ;
    9 |         for(i=0;i<1000;i++){
      |         ~~~                
a.cc:9:27: error: expected ';' before ')' token
    9 |         for(i=0;i<1000;i++){
      |                           ^
      |                           ;
a.cc:12:19: error: 'retern' was not declared in this scope; did you mean 'extern'?
   12 |         if(ans=0) retern 0;
      |                   ^~~~~~
      |                   extern
a.cc:13:27: error: expected ';' before '}' token
   13 |         printf("%d\n",ans)
      |                           ^
      |                           ;
   14 |     }
      |     ~
Language: C++

#include <stdio.h>

int main(void){
    int ans,i;
    char number[1001];
    while(1){
        ans=0;
        scanf("%s",number);
        for(i=0;i<1000;i++){
            ans+=number[i];
        }
        if(ans=0){
            retern 0;
        }
        printf("%d\n",ans);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'retern' was not declared in this scope; did you mean 'extern'?
   13 |             retern 0;
      |             ^~~~~~
      |             extern
Language: C++

#include<stdio.h>
#include<stdlib.h>
#include<iostream>&#160;&#160;
#include<conio.h>

//using namespace number;    

int main( )
{
    int i,ans;
    char number[1001];
    for(i=0;i<1000;i++)
    {
        number[i] = 48;
    }
    do{
        ans=48;
        scanf("%s",number);
        for(i=0;i<1000;i++){
            ans = ans + number[i] - 48;
            number[i] = 48;
        }
        std::cout<<ans<<"\n";
    } while(ans!=0);
    return 0;
}

Compiler output:
a.cc:3:19: warning: extra tokens at end of #include directive
    3 | #include<iostream>&#160;&#160;
      |                   ^
a.cc:4:9: fatal error: conio.h: No such file or directory
    4 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

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

//using namespace number;    

int main( )
{
    int i,ans;
    char number[1001];
    for(i=0;i<1000;i++)
    {
        number[i] = 48;
    }
    do{
        ans=48;
        scanf("%s",number);
        for(i=0;i<1000;i++){
            ans = ans + number[i] - 48;
            number[i] = 48;
        }
        std::cout<<ans<<"\n";
    } while(ans!=0);
    return 0;
}

Compiler output:
a.cc:4:9: fatal error: conio.h: No such file or directory
    4 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class Main {

    public static void main (String []args){
	Scanner sc = new Scanner(System.in);
	for (;;){
	    int n = sc.nextInt();
	    int x = sc.nextInt();
	    if(n == 0 && x == 0) return;
	    int count = 0;
	
	    OUTER:
	    for(int i = 0;i < n; ++i){
		for(int j = i;j < n; ++j){
		    for(int k = j;k < n; ++k){
			if (i + j>x) break OUTER;
			if (i + j + k == x) ++count;
		    }
		}
	    }
	    System.out.println(count);

	}
	sc.close();
    }
}

Compiler output:
Main.java:25: error: unreachable statement
	sc.close();
	^
1 error
Language: Java

import java.util.Scanner;

class Main
{
	public static void main(String args[])
	{
		
		Scanner scan= new Scanner(System.in);
		while(true)
		{
			int n = scan.nextInt();
			int x = scan.nextInt();
			inc cnt = 0;
			//??????????????????????????????????????????????????§????????????
			for(int i=1; i<=x-2; i++)
			{
				for(int j=i+1; j<=x-1; j++)
				{
					for(int k=j+1; k<x; k++ )
					{
						if(i+j+k==x)
						{
							cnt++;
						
						}
					}
				}
			}
			System.out.println(cnt);
		}
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
			inc cnt = 0;
			^
  symbol:   class inc
  location: class Main
1 error
Language: Java

import java.util.Scanner;

class Main
{
	public static void main(String args[])
	{
		
		Scanner scan= new Scanner(System.in);
		while(true)
		{
			int n = scan.nextInt();
			int x = scan.nextInt();
			inc cnt = 0;
			//??????????????????????????????????????????????????§????????????
			if(n==0 && x==0)
				break;
			for(int i=1; i<=x-2; i++)
			{
				for(int j=i+1; j<=x-1; j++)
				{
					for(int k=j+1; k<x; k++ )
					{
						if(i+j+k==x)
						{
							cnt++;
						
						}
					}
				}
			}
			System.out.println(cnt);
		}
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
			inc cnt = 0;
			^
  symbol:   class inc
  location: class Main
1 error
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int counter = 0;
    while (true) {
      int n = sc.nextInt();
      int x = sc.nextInt();
      if (n == 0 && x == 0) {
        break;
      }
      for (k = 1; k < n-2; k++) {
        for (j = k+1; j < n-1; j++) {
          for (i = j+1; i < n; i++) {
            if (i+j+k == n) {
              counter++;
            }
          }
        }
      }
      System.out.println(counter)
    }
  }
}

Compiler output:
Main.java:21: error: ';' expected
      System.out.println(counter)
                                 ^
1 error
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int counter = 0;
    while (true) {
      int n = sc.nextInt();
      int x = sc.nextInt();
      if (n == 0 && x == 0) {
        break;
      }
      for (k = 1; k < n-2; k++) {
        for (j = k+1; j < n-1; j++) {
          for (i = j+1; i < n; i++) {
            if (i+j+k == n) {
              counter++;
            }
          }
        }
      }
      System.out.println(counter);
    }
  }
}

Compiler output:
Main.java:12: error: cannot find symbol
      for (k = 1; k < n-2; k++) {
           ^
  symbol:   variable k
  location: class Main
Main.java:12: error: cannot find symbol
      for (k = 1; k < n-2; k++) {
                  ^
  symbol:   variable k
  location: class Main
Main.java:12: error: cannot find symbol
      for (k = 1; k < n-2; k++) {
                           ^
  symbol:   variable k
  location: class Main
Main.java:13: error: cannot find symbol
        for (j = k+1; j < n-1; j++) {
             ^
  symbol:   variable j
  location: class Main
Main.java:13: error: cannot find symbol
        for (j = k+1; j < n-1; j++) {
                 ^
  symbol:   variable k
  location: class Main
Main.java:13: error: cannot find symbol
        for (j = k+1; j < n-1; j++) {
                      ^
  symbol:   variable j
  location: class Main
Main.java:13: error: cannot find symbol
        for (j = k+1; j < n-1; j++) {
                               ^
  symbol:   variable j
  location: class Main
Main.java:14: error: cannot find symbol
          for (i = j+1; i < n; i++) {
               ^
  symbol:   variable i
  location: class Main
Main.java:14: error: cannot find symbol
          for (i = j+1; i < n; i++) {
                   ^
  symbol:   variable j
  location: class Main
Main.java:14: error: cannot find symbol
          for (i = j+1; i < n; i++) {
                        ^
  symbol:   variable i
  location: class Main
Main.java:14: error: cannot find symbol
          for (i = j+1; i < n; i++) {
                               ^
  symbol:   variable i
  location: class Main
Main.java:15: error: cannot find symbol
            if (i+j+k == n) {
                ^
  symbol:   variable i
  location: class Main
Main.java:15: error: cannot find symbol
            if (i+j+k == n) {
                  ^
  symbol:   variable j
  location: class Main
Main.java:15: error: cannot find symbol
            if (i+j+k == n) {
                    ^
  symbol:   variable k
  location: class Main
14 errors
Language: Java

import java.util.*;

public class Main {


	public static void main(String[] args) {
		int i,k,e,a=0;
		Scanner s = new Scanner(System.in);
		while(true){
			int n = s.nextInt();
			int x = s.nextInt();
			if(n == 0 && x == 0) break;
		
			
			for(i=1; i<=n; i++){
				for(k=i+1; k<=n; k++){
					for(e=k+1; e<=n; e++){
						if(i != k && k != e && e != i && i + k + e == x) a++;
						
					}
				}
			}
		System.out.println(a);
		}

	}

Compiler output:
Main.java:26: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x = in.nextInt();
		while(n != 0 || x != 0){
			int cnt = 0;
			for(int i = 1; i <= n; i++){
				for(int k = i + 1; k <= n && i + k < x; k++){
					for(int m = k + 1; m <= n && i + k + m <= x; m++){
						if(i + k + m == x){
							cnt++;
						}
					}
				}
			}
			System.out.println(cnt);
			n = in.nextInt();
			x = in.nextInt();
		}
	}	
}

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

include <stdio.h>
int main(){
  int n,x,y=0,i,j,k;
  scanf("%d %d",&n,&x);
  while((n!=0)||(x!=0)){
  for(i=1;i<=n;i++){
    for(j=i+1;j<=n;j++){
      for(k=j+1;k<=n;k++){
	if(i+j+k==x)y++;
      }
    }
  }
  printf("%d\n",y);
  scanf("%d %d",&n,&x);
  }
  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()
{
	int n,x;
	int i,j,k,count=0;

	scanf("%d %d",&n,&x);

	if(n != 0 && x !=0)
	{
		for(i=1;i<=n;i++)
		{
			for(j=i+1;j<=n;j++)
			{
				for(k=j+1;k<=n;k++)
				{
					if(i+j+k==x)
					count++;
				}
			}
		}
		printf("%d\n",count);
	}

	return (0);
}

Compiler output:
main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(stdio.h)
      |         ^
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |         scanf("%d %d",&n,&x);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #include(stdio.h)
main.c:7:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |         scanf("%d %d",&n,&x);
      |         ^~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:22:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   22 |                 printf("%d\n",count);
      |                 ^~~~~~
main.c:22:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:22:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

int main()
{
  int n, x;
  int i, j, k;
  int count;

  while(scanf("%d %d",&n,&x) != EOF)
  {
    count = 0

    if(n==0 && x== 0)
      break;

    for(i=1; i<=n; i++)
    {
      for(j=i+1; j<=n; j++)
      {
        for(k=j+1; k<=n; k++)
        {
          if(i+j+k == x)
            count++;
        }
      }
    }

    printf("%d\n", count);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:14: error: expected ';' before 'if'
   11 |     count = 0
      |              ^
      |              ;
   12 | 
   13 |     if(n==0 && x== 0)
      |     ~~
Language: C

#include <stdio.h>

main()
{
int a,b,c,d,e,f=0;

while(scanf("%d %d",&a &b)!=0){

for(c=1;c<=a;c++){

for(d=1;d<=a;d++){

for(e=1;e<=a;e++){

if(c+d+e==b) f++;

}

}

}

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

}


return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:7:24: error: invalid operands to binary & (have 'int *' and 'int')
    7 | while(scanf("%d %d",&a &b)!=0){
      |                     ~~ ^
      |                     |
      |                     int *
Language: C

#include <stdio.h>

main()
{
int a,b,c,d,e,f=0;

while(scanf("%d %d",&a &b)!=EOF){

if(a==0 && b==0) break;

for(c=1;c<=a;c++){

for(d=1;d<=a;d++){

for(e=1;e<=a;e++){

if(c+d+e==b) f++;

}

}

}

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

}


return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:7:24: error: invalid operands to binary & (have 'int *' and 'int')
    7 | while(scanf("%d %d",&a &b)!=EOF){
      |                     ~~ ^
      |                     |
      |                     int *
Language: C

#include <stdio.h>

int main(void)
{
int a,b,c,d,e,f=0;

while(scanf("%d %d",&a &b)!=EOF){

if(a==0 && b==0) break;

for(c=1;c<=a;c++){

for(d=1;d<=a;d++){

for(e=1;e<=a;e++){

if(c+d+e==b) f++;

}

}

}

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

}


return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:24: error: invalid operands to binary & (have 'int *' and 'int')
    7 | while(scanf("%d %d",&a &b)!=EOF){
      |                     ~~ ^
      |                     |
      |                     int *
Language: C

#include <stdio.h>
int main (void) {
	int i, j, k, n, x, y=0;
	
	while (1) {
		scanf("%d %d", &n, &x);
		
		if (n == 0 && x == 0) {
			break;
		}
	
		for (i=n; i>=3; i--) {
			for (j=i-1; j>=2; j--) {
				for (k=j-1; k>=1; k--) {
					
					if (x == i + j + k) {
						y++;
					}
				}
			}
		}
	
		printf("%d\n", y);
		
		y = 0;
	}

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

#include <stdio.h>
int main (void) {
	int i, j, k, n, x, y;

        y = 0;
	
	while (1) {
		scanf("%d %d", &n, &x);
		
		if (n == 0 && x == 0) {
			break;
		}
	
		for (i=n; i>=3; i--) {
			for (j=i-1; j>=2; j--) {
				for (k=j-1; k>=1; k--) {
					
					if (x == i + j + k) {
						y++;
					}
				}
			}
		}
	
		printf("%d\n", y);
		
		y = 0;
	}

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

#include <stdio.h>

#define is(a,b,c,d) (a + b + c == d)

int main(void){
	int x,n;
	int cnt=0;
	while(true){
		scanf("%d %d",&n,&x);
		if(!x && !n)
			return 0;
		for(int a=1; a <= n; a++){
			for(int b=1; (b <= n) && (a != b); b++){
				for(int c=1; (c <= n) && (a != b) && (a != c); c++){
					cnt+=is(a,b,c,x);				
				}
			}
		}

	}
}
	
bool isn(int a, int b, int c, int n){
	

Compiler output:
main.c: In function 'main':
main.c:8:15: error: 'true' undeclared (first use in this function)
    8 |         while(true){
      |               ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:8:15: note: each undeclared identifier is reported only once for each function it appears in
    8 |         while(true){
      |               ^~~~
main.c: At top level:
main.c:23:1: error: unknown type name 'bool'
   23 | bool isn(int a, int b, int c, int n){
      | ^~~~
main.c:23:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: In function 'isn':
main.c:23:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>

#define is(a,b,c,d) (a + b + c == d)

int main(void){
	int x,n;
	int a,b,c;
	int cnt=0;
	while(1){
		scanf("%d %d",&n,&x);
		if(!x && !n)
			return 0;
		for(a=1; a <= n; a++){
			for(b=1; (b <= n) && (a != b); b++){
				for(c=1; (c <= n) && (a != b) && (a != c); c++){
					cnt+=is(a,b,c,x);				
				}
			}
		}

	}
}
	
bool isn(int a, int b, int c, int n){
	

Compiler output:
main.c:24:1: error: unknown type name 'bool'
   24 | bool isn(int a, int b, int c, int n){
      | ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c: In function 'isn':
main.c:24:1: error: expected declaration or statement at end of input
   24 | bool isn(int a, int b, int c, int n){
      | ^~~~
Language: C

#include <stdio.h>
  int main(){
   int h,i,j,k;
     int n,x,prob;
      prob=0;
      for(h=0;h>=0;h++){
       if(n=0 && x=0){
         break;
         }else{           
           scanf("%d%d",n,x);
             for(i=0;i<=n;i++){
             for(j=0;j<=n;j++){
             for(k=0;k<=n;k++){
              if(i=j || i=k || j=k){
                i=i;
                j=j;
                k=k;
                 }else{
                  if(i+j+k=x){
　　　　　　　　　　prob+=1;
                 }
                }
}
}
}
printf("%d",prob);
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:19: error: lvalue required as left operand of assignment
    7 |        if(n=0 && x=0){
      |                   ^
main.c:14:33: error: lvalue required as left operand of assignment
   14 |               if(i=j || i=k || j=k){
      |                                 ^
main.c:19:27: error: lvalue required as left operand of assignment
   19 |                   if(i+j+k=x){
      |                           ^
main.c:20:1: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      | ^~~~~~~~
main.c:20:3: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |         ^~~~~~~~
main.c:20:5: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                 ^~~~~~~~
main.c:20:7: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                         ^~~~~~~~
main.c:20:9: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                                 ^~~~~~~~
main.c:20:11: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                                         ^~~~~~~~
main.c:20:13: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                                                 ^~~~~~~~
main.c:20:15: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                                                         ^~~~~~~~
main.c:20:17: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                                                                 ^~~~~~~~
main.c:20:19: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                                                                         ^~~~~~~~
Language: C

#include <stdio.h>
  int main(){
   int h,i,j,k;
     int n,x,prob;
      prob=0;
      for(h=0;h>=0;h++){
       if(n==0 && x==0){
         break;
         }else{           
           scanf("%d%d",n,x);
             for(i=0;i<=n;i++){
             for(j=0;j<=n;j++){
             for(k=0;k<=n;k++){
              if(i==j || i==k || j==k){
                i=i;
                j=j;
                k=k;
                 }else{
                  if(i+j+k==x){
　　　　　　　　　　prob+=1;
                 }
                }
}
}
}
printf("%d",prob);
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:1: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      | ^~~~~~~~
main.c:20:3: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |         ^~~~~~~~
main.c:20:5: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                 ^~~~~~~~
main.c:20:7: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                         ^~~~~~~~
main.c:20:9: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                                 ^~~~~~~~
main.c:20:11: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                                         ^~~~~~~~
main.c:20:13: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                                                 ^~~~~~~~
main.c:20:15: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                                                         ^~~~~~~~
main.c:20:17: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                                                                 ^~~~~~~~
main.c:20:19: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob+=1;
      |                                                                         ^~~~~~~~
Language: C

#include <stdio.h>
  int main(){
   int h,i,j,k;
     int n,x,prob;
      prob=0;
      for(h=0;h>=0;h++){
       if(n==0 && x==0){
         break;
         }else{           
           scanf("%d%d",n,x);
             for(i=0;i<=n;i++){
             for(j=0;j<=n;j++){
             for(k=0;k<=n;k++){
              if(i==j || i==k || j==k){
                i=i;
                j=j;
                k=k;
                 }else{
                  if(i+j+k==x){
　　　　　　　　　　prob += 1;
                 }
                }
}
}
}
printf("%d",prob);
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:1: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob += 1;
      | ^~~~~~~~
main.c:20:3: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob += 1;
      |         ^~~~~~~~
main.c:20:5: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob += 1;
      |                 ^~~~~~~~
main.c:20:7: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob += 1;
      |                         ^~~~~~~~
main.c:20:9: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob += 1;
      |                                 ^~~~~~~~
main.c:20:11: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob += 1;
      |                                         ^~~~~~~~
main.c:20:13: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob += 1;
      |                                                 ^~~~~~~~
main.c:20:15: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob += 1;
      |                                                         ^~~~~~~~
main.c:20:17: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob += 1;
      |                                                                 ^~~~~~~~
main.c:20:19: error: stray '\343' in program
   20 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>prob += 1;
      |                                                                         ^~~~~~~~
Language: C

#include <stdio.h>

int main(void)
{
	int n,x,i,j,k,count;

	for(count=0; ; count=0;){
		scanf("%d %d",&n,&x);
		if(n==0 && x==0)
			break;
		for(i=1; i<=n-2; i++)
			for(j=i+1; j<=n-1; j++)
				for(k=j+1; k<=n; k++)
					if(i+j+k==x)
						count++;
		printf("%d\n",count);
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:31: error: expected ')' before ';' token
    7 |         for(count=0; ; count=0;){
      |            ~                  ^
      |                               )
Language: C

#include <stdio.h>

int main( void )
{
	int n, x;
	int i, j, k;
	int Pattern = 0;
	while( 1 )
	{
		scanf( "%d %d", &n, &x );
		if( n == 0 && x == 0 )break;
		for( i = 1; i <= n; i++ )
		{
			for( j = i+1; j <= n; j++ )
			{
				for( k = j+1x; k <= n; k++ )
				{
					if( i + j + k == x )
					{
						Pattern++;
						printf("%d+%d+%d=%d\n",i,j,k,i+j+k);
					}
				}
			}
		}
		printf("%d\n",Pattern);
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:44: error: invalid suffix "x" on integer constant
   16 |                                 for( k = j+1x; k <= n; k++ )
      |                                            ^~
Language: C

#include<stdio.h>

int main(void){
  int n,x;
  while((scanf("%d %d",&n,&x)==2)){
    if(n==0 && x==0)goto a;
    int i,j,k;
    int s,t;
    int count=0;
    for(i=1;i<=n;i++){
      s=x-i;
      for(j=i;j<=n;j++){
        t=s-j;
        if(t<j)goto a;
        else if(t>n)goto a;
        else count++;
        }
      }
    }
    a:
  }
  return 0;
}

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

include <stdio.h> 
int main(){
  while(1){
    int a,b,c,n,x,cnt=0;
  scanf("%d %d",&n,&x);
  if(n==0&&x==0)break;
  for(a=1;a<=n;a++){
    for(b=a+1;b<=n;b++){
      for(c=b+1;c<=n;c++){
	if(x==a+b+c)cnt++;
      }
    }
  }
  printf("%d\n",cnt);
  }
  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()
{
    int n[65535],x[65535];
    int i,j,k,l,cnt;

    for(i=0;;i++){
        scanf("%d %d",n+i,x+i);
        if(n[i]==0&&x[i]==0)
            t=i;
            break;
    }
    
    for(i=0;i<t;i++){
        cnt=0;
        for(j=1;j<=n[i];j++){
            for(k=1;k<j;k++){
                for(l=1;l<k;l++){
                    if(j+k+l==x[i])
                        cnt++;
                 }
             }
         }
        printf("%d\n",cnt);
    }
    return 0;
}


     

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

#include<stdio.h>

int main(void)
{
while(1){
int n, s;
scanf("%d %d", &n, &s);
if(!(n|s)) continue;

int i,j,k,pat=0;
for(i=n;i>0;i--){
if(i>s-2) continue;
for(j=n-1;j>0;j--){
if(i+j>s-1) continue;
for(k=n-2;k>0;k--{
if(i+j+k==s){ pat++; break; }
}
}
}
printf("%d\n",pat);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:18: error: expected ')' before '{' token
   15 | for(k=n-2;k>0;k--{
      |    ~             ^
      |                  )
main.c:18:1: error: expected expression before '}' token
   18 | }
      | ^
Language: C

#include<stdio.h>

int main(void)
{
while(1){
int n, s;
scanf("%d %d", &n, &s);
if(!(n|s)) break;

int i,j,k,pat=0;
for(i=n;i>2;i--){
if(i>s-2) continue;
for(j=n-1;j>1;j--){
if(i+j>s-1) continue;
for(k=n-2;k>0;k--{
if(i+j+k==s){ pat++; break; }
}
}
}
printf("%d\n",pat);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:18: error: expected ')' before '{' token
   15 | for(k=n-2;k>0;k--{
      |    ~             ^
      |                  )
main.c:18:1: error: expected expression before '}' token
   18 | }
      | ^
Language: C

#include <stdio.h>

int main(void)
{
int a,b,c,n,m,i,count=0;

while(1){
scanf("%d %d",&a,&b);
count=0;
if(a==0&&b==0)break;
for(i=1;i<a;i++)
{
	for(n=1;n<a;n++)
	{
		for(m=1;m<a;m++)
		{
			if(b=i+n+m)count++;
			if(i=n||n=m||m=i)count--;
		}
	}
}

printf("%d\n",count/6);
}
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:18:39: error: lvalue required as left operand of assignment
   18 |                         if(i=n||n=m||m=i)count--;
      |                                       ^
Language: C

#include <stdio.h>

int main(void)
{
int a,b,c,n,m,i,count=0;

while(1){
scanf("%d %d",&a,&b);
count=0;
if(a==0&&b==0)break;
for(i=1;i<a;i++)
{
	for(n=1;n<a;n++)
	{
		for(m=1;m<a;m++)
		{
			if(b=i+n+m)count++;
			if(i=n)count--;
			if(n=m)count--;
			if(i=m)count--;
			if(i=n&&n=m)count++;
			
		}
	}
}

printf("%d\n",count/6);
}
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:21:34: error: lvalue required as left operand of assignment
   21 |                         if(i=n&&n=m)count++;
      |                                  ^
Language: C

#include <stdio.h>

int main(void)
{
int a,b,c,n,m,i,count=0;

while(1){
scanf("%d %d",&a,&b);
count=0;
if(a==0&&b==0)break;
for(i=1;i<a;i++)
{
	for(n=1;n<a;n++)
	{
		for(m=1;m<a;m++)
		{
			if(b=i+n+m)count++;
			else if(i=n && n=m)count++;
			else if(i=n)count--;
			else if(n=m)count--;
			else if(i=m)count--;
			
			
		}
	}
}

printf("%d\n",count/6);
}
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:18:41: error: lvalue required as left operand of assignment
   18 |                         else if(i=n && n=m)count++;
      |                                         ^
Language: C

include<stdio.h>
int main(void){
    int a,b,c=0,i,j,k,l;
    for(;;){
    scanf("%d%d",&a,&b);
    if(a==0&&b==0){
        break;
    }
    for(i=1;i<=a;i++){
        for(k=1;k<=a;k++){
            if(k==i){
                break;
            }
            for(l=1;l<=a;l++){
                if(l==i||l==k){
                    break;
                }
                if(i+k+l==b){
                    c++;
                }
            }
        }
    }
    printf("%d",c);
    }
return 0;
}

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

#include<stdio.h>
#include<string>

int main(void){
	int number,x;

	while( scanf("%d %d",&number ,&x) ){
		if( (number==0)&&(x==0) ){
			break;
		}

		int i,j,k;
		int count = 0;

		for(i=1; i<=number; i++){
			for(j=1; j<=number; j++){
				for(k=1; k<=number; k++){
					if( (i+j+k==x)&&(i!=j)&&(j!=k)&&(k!=i) ){
						count++;
					}
				}
			}
		}
		count = count / 6;
		printf("%d\n",count);

	}

	return 0;
}

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

include<stdio.h>

int main(){

  int n,x,i,j,k,a;
  a=0;

  while (1) {
    scanf("%d %d",&n,&x);
    if (n==0 && x==0) {
      break;
    }

    for (i=1; 3*i+3<=x; i++) {
      for (j=i+1; i+2*j+1<=x; j++) {
        for (k=n;k>j ; k--) {

          if (x==i+j+k) {
            a++;
            break;
          }
          else if(x>=i+j+k){
            break;
          }


        }
      }
    }
    printf("%d\n",a);
  }
  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 n,x,i,j,k,smp=0;
  while(1){
    scanf("%d %d",&n,&x);
    if(n == 0 && x == 0)break;
    for(i=1;i<=n;i++){
      for(j=i+1;j<=n;j++){
	for(k=j+1;k<=n;k++){
	  if(x==a+b+c)smp++;
	}
      }
    }
    printf("%d\n",smp);
  }
  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:10:17: error: 'a' undeclared (first use in this function)
   10 |           if(x==a+b+c)smp++;
      |                 ^
main.c:10:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:19: error: 'b' undeclared (first use in this function)
   10 |           if(x==a+b+c)smp++;
      |                   ^
main.c:10:21: error: 'c' undeclared (first use in this function)
   10 |           if(x==a+b+c)smp++;
      |                     ^