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

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



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

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


Compiler output:
Main.java:6: error: ']' expected
	    int data[100] = new int[100];
	             ^
Main.java:6: error: not a statement
	    int data[100] = new int[100];
	                    ^
2 errors
Language: Java

import java.util.Scanner;

//20180509
//04

public class Main {
    public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);

		while (scanner.hasNextLine()) {
			int n = scanner.nextInt();
			int x = scanner.nextInt();
			int count = 0;

			if(n + x == 0) {
				break;
			}

			for(int i = 1;i <= n;i++) {
				for(int j = i + 1;j <= n;j++) {
					for(int k = i + 3;k <= n;k++) {
						if(i + j + k == x) {
							count++;
						}
					}
				}
			}
			System.out.println(count);
		}
		scanner.close();
  


Compiler output:
Main.java:30: error: reached end of file while parsing
		scanner.close();
		                ^
1 error
Language: Java

public class Main {

	public static void main(String[] args) {
		int[] f_w = new int[2];
		Scanner sc = new Scanner(System.in);

		do {
			for (int i = 0; i < 2; i++) {
				f_w[i] = sc.nextInt();
			}

			if (f_w[0] == 0 && f_w[1] == 0) {
				break;
			} else {
				 System.out.println(findWays(f_w[0], f_w[1]));
			}
		}while(true);
		sc.close();


	}

	private static int findWays(int n, int x) {
		int cnt = 0;

		for (int i = 1; i <= n; i++) {
			for (int j = i + 1; j <= n; j++) {
				for (int k = j + 1; k <= n; k++) {

					if (i != j && j != k && k != i && i + j + k == x) {
							cnt++;
					}

				}
			}
		}

		return cnt;

	}

}


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

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

public class Mian {
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		for(;;)
		{
			String[] numberStr = input.readLine().split(" ");
			
			int max = Integer.parseInt(numberStr[0]);
			
			int sum = Integer.parseInt(numberStr[1]);
			
			if((max == 0)&&(sum == 0))
			{
				break;
			}
			
			int set = 0;
			
			for(int oneNum = 1; oneNum <= max - 2; oneNum++)
			{
				for(int twoNum = oneNum + 1; twoNum <= max + 1; twoNum++)
				{
					for(int threeNum = twoNum + 1; threeNum <= max; threeNum++)
					{
						if(oneNum + twoNum + threeNum == sum)
						{
							set++;
						}
					}
				}
			}
			
			System.out.println(set);
		}
	}
}



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

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

   


Compiler output:
Main.java:6: error: ';' expected
   p=0
      ^
Main.java:19: error: ';' expected
      g=i+j+k;
       ^
Main.java:19: error: not a statement
      g=i+j+k;
           ^
3 errors
Language: C

#include<stdio.h>

int main()
{
 int n,x,i,j,k,s;
 scanf("%d%d",&n,&x);

 for(;;){
       s=0
       if(n==0&&x==0)break;

       for(i=1;i<=n;i++){

                        for(j=i+1;j<=n-1;j++){
                         
                                             for(k=j+1;k<=n-2;k++){
                                                                   s=s++;
                                                                   }
                                             }
                          }
           }

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

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:9:11: error: expected ';' before 'if'
    9 |        s=0
      |           ^
      |           ;
   10 |        if(n==0&&x==0)break;
      |        ~~
Language: C

#include<bits/stdc++.h>
using namespace std;

int main(){
    int n,x,exe=0;
    int i,j,m;

    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(m=j+1;m<=n;m++){

                if(i<j&&j<m){
                    if(i+j+m==x){
                        exe++;
                    }

                }
            }
        }
    }

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

    return 0;
}



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

#include <stdio.h>

int main(void){

int c,l,n,x;
int i,j,k;

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


Compiler output:
main.c: In function 'main':
main.c:11:8: error: expected ';' before ')' token
   11 |   break);}
      |        ^
      |        ;
main.c:11:8: error: expected statement before ')' token
main.c:16:6: error: expected ';' before '}' token
   16 |   l++
      |      ^
      |      ;
   17 |   }}}
      |   ~   
main.c:20:1: error: expected declaration or statement at end of input
   20 | return 0;}
      | ^~~~~~
Language: C

#include <stdio.h>

int main(void){

int c,l,n,x;
int i,j,k;

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


Compiler output:
main.c: In function 'main':
main.c:11:8: error: expected ';' before ')' token
   11 |   break);}
      |        ^
      |        ;
main.c:11:8: error: expected statement before ')' token
main.c:16:6: error: expected ';' before '}' token
   16 |   l++
      |      ^
      |      ;
   17 |   }}}
      |   ~   
main.c:20:1: error: expected declaration or statement at end of input
   20 | return 0;}
      | ^~~~~~
Language: C

#include <stdio.h>
int main(void){
    int n,x,i,j,k,std::array<T, N> ;;
    while(1){
        scanf("%d %d",&n,&x);
        if(n==0&&x==0) break;
        a=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) a++;
                }
            }
        }
        printf("%d\n",a);
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:3:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '::' token
    3 |     int n,x,i,j,k,std::array<T, N> ;;
      |                      ^~
main.c:7:9: error: 'a' undeclared (first use in this function)
    7 |         a=0;
      |         ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(void){
    int n,x,i,j,k,std::array<T, N> ;;
    while(1){
        scanf("%d %d",&n,&x);
        if(n==0&&x==0) break;
        a=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) a++;
                }
            }
        }
        printf("%d\n",a);
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:3:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '::' token
    3 |     int n,x,i,j,k,std::array<T, N> ;;
      |                      ^~
main.c:7:9: error: 'a' undeclared (first use in this function)
    7 |         a=0;
      |         ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
  int i,j,k;
  int x,n;
  while(1){
    sca


Compiler output:
main.c: In function 'main':
main.c:6:5: error: 'sca' undeclared (first use in this function); did you mean 'scanf'?
    6 |     sca
      |     ^~~
      |     scanf
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:8: error: expected ';' at end of input
    6 |     sca
      |        ^
      |        ;
main.c:6:5: error: expected declaration or statement at end of input
    6 |     sca
      |     ^~~
main.c:6:5: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>

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

   do {
      scanf("%d %d", &n, &x);
   } while(n == 0&&x == 0);*/

   y = 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);

   return 0;
}


Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:8:29: error: expected expression before '/' token
    8 |    } while(n == 0&&x == 0);*/
      |                             ^
Language: C

#include<stdio.h>
int main(void) {
  int a[3], n[10], x[10], i = 0, j, k, c;
  while(1) {
    scanf("%d %d",&n[i], &x[i]);
    if(n[i] == 0 && x[i] == 0) {
      break;
    }
    if(n[i] >= 3 && x[i] >= 0 && n[i] <=100 && x[i] <= 300) {
      i++;
    }
  }
  for(j = 0; j < i; j++) {
    c = 0;
    for(k = 0, k < n[i]; k++) {
      if((k+1)*3/2 == x[i]) {
        c++;
      }
    }
    printf("%d ",x[i]);
  }
  printf("\n");
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:15:29: error: expected ';' before ')' token
   15 |     for(k = 0, k < n[i]; k++) {
      |                             ^
      |                             ;
Language: C

#include<stdio.h>
int main(void) {
  int a[3], n[100], x[100], i = 0, j, k, c;
  while(1) {
    scanf("%d %d",&n[i], &x[i]);
    if(n[i] == 0 && x[i] == 0) {
      break;
    }
    if(n[i] >= 3 && x[i] >= 0 && n[i] <=100 && x[i] <= 300) {
      i++;
    }
  }
  for(j = 0; j < i; j++) {
    c = 0;
    for(k = 0, k < n[i]; k++) {
      if((k+1)*3/2 == x[i]) {
        c++;
      }
    }
    printf("%d ",x[i]);
  }
  printf("\n");
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:15:29: error: expected ';' before ')' token
   15 |     for(k = 0, k < n[i]; k++) {
      |                             ^
      |                             ;
Language: C

#include <stdio.h>

int main(void)
{

 int n[1000];
 int x[1000];
 int a = 0;
 int b = 0;
 int c = 0;
 int i, j;

 while (a == 0)
{
     
  scanf("%d", &n[b]);
  scanf("%d", &x[b]);

 if(n[b] == 0 && x[b] == 0)
 {
  a = 1;
  }else
 {
   for (i = 1; i < n[b]; i++)
{
  for (j = 1; j < n[b]; j++)
 
{
  if( x[b] - i - j > 0)
  c++;

 }
 }

  printf("%d\n", c/6);

  b++;

}

return 0;

}



 


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

#include <stdio.h>

int main(){

int n[100],x[100],count1,count2,k,t,i,j,l;


for(i=0;;i++){

scanf("%d %d\n",&n[i],&x[i]);
count1=count1+1;
if(n[i]=0 && x[i]=0){
break;
}
}

for(k=0;k<count1;k++){
 int g[n[k]];
 for(t=0;t<=n[k];t++){
  g[t]=t;
 }
 for(i=0;i<n;i++){
  a=g[i];
   for(j=i+1;j<n;j++){
    b=g[j];
    for(l=j+1;l<n;l++){
     c=g[l];
     if(a+b+c=x[k]){
      count=count+1;

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

return 0

}


Compiler output:
main.c: In function 'main':
main.c:12:18: error: lvalue required as left operand of assignment
   12 | if(n[i]=0 && x[i]=0){
      |                  ^
main.c:22:11: warning: comparison between pointer and integer
   22 |  for(i=0;i<n;i++){
      |           ^
main.c:23:3: error: 'a' undeclared (first use in this function)
   23 |   a=g[i];
      |   ^
main.c:23:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:15: warning: comparison between pointer and integer
   24 |    for(j=i+1;j<n;j++){
      |               ^
main.c:25:5: error: 'b' undeclared (first use in this function)
   25 |     b=g[j];
      |     ^
main.c:26:16: warning: comparison between pointer and integer
   26 |     for(l=j+1;l<n;l++){
      |                ^
main.c:27:6: error: 'c' undeclared (first use in this function)
   27 |      c=g[l];
      |      ^
main.c:29:7: error: 'count' undeclared (first use in this function); did you mean 'count2'?
   29 |       count=count+1;
      |       ^~~~~
      |       count2
main.c:38:9: error: expected ';' before '}' token
   38 | return 0
      |         ^
      |         ;
   39 | 
   40 | }
      | ~
Language: C

#include<stdio.h>

int main()
{
   int i, j, k;
   int n, x;
   int a = 0;

   do {
   scanf("%d %d\n", &n, &x);

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

   printf("%d\n", a/6);
   }while(n=0 && x=0);

   return 0;
}
   



Compiler output:
main.c: In function 'main':
main.c:23:19: error: lvalue required as left operand of assignment
   23 |    }while(n=0 && x=0);
      |                   ^
Language: C

#include <stdio.h>

int main(void){

   int n, x, i, j, k
   int num = 0, count = 0;

   while (x!=0 && n!=0) {

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

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

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

   }

   return(0);

}




Compiler output:
main.c: In function 'main':
main.c:6:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
    6 |    int num = 0, count = 0;
      |    ^~~
main.c:13:10: error: 'num' undeclared (first use in this function)
   13 |          num = 0;
      |          ^~~
main.c:13:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:18: error: 'k' undeclared (first use in this function)
   18 |             for (k = j+1; k <= n; k++) {
      |                  ^
main.c:22:19: error: 'count' undeclared (first use in this function)
   22 |                   count++;
      |                   ^~~~~
Language: C

#include <stdio.h>

int main(void){

   int n, x, i, j, k;
   int num = 0, count = 0;

   while (true) {

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

      if (x==0 && y==0) {
         break;
      }

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

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

   }

   return(0);

}




Compiler output:
main.c: In function 'main':
main.c:8:11: 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:11: note: each undeclared identifier is reported only once for each function it appears in
    8 |    while (true) {
      |           ^~~~
main.c:12:19: error: 'y' undeclared (first use in this function)
   12 |       if (x==0 && y==0) {
      |                   ^
Language: C

#include <stdio.h>

int main(void){

   int n, x, i, j, k;
   int num = 0, count = 0;

   while (true) {

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

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

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

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

   }

   return(0);

}




Compiler output:
main.c: In function 'main':
main.c:8:11: 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:11: note: each undeclared identifier is reported only once for each function it appears in
    8 |    while (true) {
      |           ^~~~
Language: C

#include <stdio.h>

int main(){

int n,x,i,j,l,count[10000];

  k=0;
  
  scanf("%d %d\n",&n,&x);

  while(n!=0 && x!=0){

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

  

  
 



 if(t=0;t<=k;k++){
 printf("%d\n",count[t]);
}

return 0;

}
   



Compiler output:
main.c: In function 'main':
main.c:7:3: error: 'k' undeclared (first use in this function)
    7 |   k=0;
      |   ^
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:13: error: lvalue required as left operand of assignment
   16 |     if(i+j+l=x){
      |             ^
main.c:34:5: error: 't' undeclared (first use in this function)
   34 |  if(t=0;t<=k;k++){
      |     ^
main.c:34:8: error: expected ')' before ';' token
   34 |  if(t=0;t<=k;k++){
      |    ~   ^
      |        )
main.c:40:1: error: expected declaration or statement at end of input
   40 | }
      | ^
Language: C

#include <stdio.h>

int main(){

int n,x,i,j,l,count[10000];

  k=0;
  
  scanf("%d %d\n",&n,&x);

  while(n!=0 && x!=0){

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


 if(t=0;t<=k;k++){
 printf("%d\n",count[t]);
}

return 0;

}
   



Compiler output:
main.c: In function 'main':
main.c:7:3: error: 'k' undeclared (first use in this function)
    7 |   k=0;
      |   ^
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:13: error: lvalue required as left operand of assignment
   16 |     if(i+j+l=x){
      |             ^
main.c:29:5: error: 't' undeclared (first use in this function)
   29 |  if(t=0;t<=k;k++){
      |     ^
main.c:29:8: error: expected ')' before ';' token
   29 |  if(t=0;t<=k;k++){
      |    ~   ^
      |        )
Language: C

#include <stdio.h>

int main(){

int n,x,i,j,l,t,count[10000];

  k=0;
  
  scanf("%d %d\n",&n,&x);

  while(n!=0 && x!=0){

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


 if(t=0;t<=k;k++){
 printf("%d\n",count[t]);
}

return 0;

}
   



Compiler output:
main.c: In function 'main':
main.c:7:3: error: 'k' undeclared (first use in this function)
    7 |   k=0;
      |   ^
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:13: error: lvalue required as left operand of assignment
   16 |     if(i+j+l=x){
      |             ^
main.c:29:8: error: expected ')' before ';' token
   29 |  if(t=0;t<=k;k++){
      |    ~   ^
      |        )
Language: C

#include <stdio.h>

int main(){

int n,x,i,j,l,t,k,count[10000];

  k=0;
  
  scanf("%d %d\n",&n,&x);

  while(n!=0 && x!=0){

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


 if(t=0;t<=k;k++){
 printf("%d\n",count[t]);
}

return 0;

}
   



Compiler output:
main.c: In function 'main':
main.c:16:13: error: lvalue required as left operand of assignment
   16 |     if(i+j+l=x){
      |             ^
main.c:29:8: error: expected ')' before ';' token
   29 |  if(t=0;t<=k;k++){
      |    ~   ^
      |        )
Language: C

#include <stdio.h>

int main(void){

   int n, x, i, j, k;
   int num = 0, count = 0;

   while (true) {

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

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

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

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

   }

   return(0);

}




Compiler output:
main.c: In function 'main':
main.c:8:11: 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:11: note: each undeclared identifier is reported only once for each function it appears in
    8 |    while (true) {
      |           ^~~~
Language: C

#include <stdio.h>

int main(){

int n,x,i,j,l,t,k,count[10000];

  k=0;
  
  
  scanf("%d %d\n",&n,&x);

  while(n!=0 && x!=0){

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


 if(t=0;t<=k;k++){
 printf("%d\n",count[t]);
}

return 0;

}
   



Compiler output:
main.c: In function 'main':
main.c:17:13: error: lvalue required as left operand of assignment
   17 |     if(i+j+l=x){
      |             ^
main.c:30:8: error: expected ')' before ';' token
   30 |  if(t=0;t<=k;k++){
      |    ~   ^
      |        )
Language: C

#include <stdio.h>

int main(){

int n,x,i,j,l,t,k,count[10000];

  k=0;
  
  
  scanf("%d %d\n",&n,&x);

  while(n!=0 && x!=0){

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


 if(t=0;t<=k;t++){
 printf("%d\n",count[t]);
}

return 0;

}
   



Compiler output:
main.c: In function 'main':
main.c:17:13: error: lvalue required as left operand of assignment
   17 |     if(i+j+l=x){
      |             ^
main.c:30:8: error: expected ')' before ';' token
   30 |  if(t=0;t<=k;t++){
      |    ~   ^
      |        )
Language: C

#include <stdio.h>

int main(void){

   int n, x, i, j, k;
   int num = 0, count = 0;

   while (true) {

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

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

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

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

   }

   return (0);

}




Compiler output:
main.c: In function 'main':
main.c:8:11: 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:11: note: each undeclared identifier is reported only once for each function it appears in
    8 |    while (true) {
      |           ^~~~
Language: C

#include <stdio.h>

int main(){

int n,x,i,j,l,t,k,count[10000];

  k=0;
  
  
  scanf("%d %d\n",&n,&x);

  while(n!=0 && x!=0){

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


 for(t=0;t<=k;t++){
 printf("%d\n",count[t]);
}

return 0;

}
   



Compiler output:
main.c: In function 'main':
main.c:17:13: error: lvalue required as left operand of assignment
   17 |     if(i+j+l=x){
      |             ^
Language: C

#include <stdio.h>

int main(void){

   int n, x, i, j, k;
   int num = 0, count = 0;

   while (true) {

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

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

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

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

   }

   return(0);

}




Compiler output:
main.c: In function 'main':
main.c:8:11: 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:11: note: each undeclared identifier is reported only once for each function it appears in
    8 |    while (true) {
      |           ^~~~
Language: C

#include <stdio.h>

int main(void){

   int n, x, i, j, k;
   int num = 0, count = 0;

   while (true) {

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

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

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

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

   }

   return(0);

}




Compiler output:
main.c: In function 'main':
main.c:8:11: 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:11: note: each undeclared identifier is reported only once for each function it appears in
    8 |    while (true) {
      |           ^~~~
Language: C

#include <stdio.h>

int main(){

int n,x,i,j,l,t,k,count[10000];

  k=0;
  
  
  scanf("%d %d\n",&n,&x);

  while(n!=0 && x!=0){

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


 for(t=0;t<=k;t++){
 printf("%d\n",count[t]);
}

return 0;

}
   



Compiler output:
main.c: In function 'main':
main.c:17:13: error: lvalue required as left operand of assignment
   17 |     if(i+j+l=x){
      |             ^
main.c:24:6: error: expected ';' before '}' token
   24 |   k++
      |      ^
      |      ;
   25 | }
      | ~
Language: C

#include <stdio.h>

int main(){

int n,x,i,j,l,t,k,count[10000];

  k=0;
  
  
  scanf("%d %d\n",&n,&x);

  while(n!=0 && x!=0){

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


 for(t=0;t<=k;t++){
 printf("%d\n",count[t]);
}

return 0;

}
   



Compiler output:
main.c: In function 'main':
main.c:17:13: error: lvalue required as left operand of assignment
   17 |     if(i+j+l=x){
      |             ^
Language: C

#include <stdio.h>

int main(void){

   int n, x, i, j, k;
   int num = 0, count = 0;

   while (true) {

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

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

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

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

   }

   return (0);

}




Compiler output:
main.c: In function 'main':
main.c:8:11: 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:11: note: each undeclared identifier is reported only once for each function it appears in
    8 |    while (true) {
      |           ^~~~
Language: C

#include <stdio.h>

int main(){

int n,x,i,j,l,t,k,count[10000];

  k=0;
  
  
  scanf("%d %d\n",&n,&x);

  while(n!=0 && x!=0){

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


 for(t=0;t<k;t++){
 printf("%d\n",count[t]);
}

return 0;

}
   



Compiler output:
main.c: In function 'main':
main.c:17:13: error: lvalue required as left operand of assignment
   17 |     if(i+j+l=x){
      |             ^
Language: C

#include<stdio.h>

int main(){

    int x,n,c;
    c = 0;
    
    while (x != 0 && n != 0) {
        scanf("%d %d\n",&x,&n);
            for (int i = 1; i <= n; i++) {
                for (int j = 1; j <= n-i; j++) {
                    for (int i = 1; i <= n-i-j; i++) {
                        c++;
                     }
                 }
             }
        printf("%d",c)
    }
    
    return 0;
}


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

#include<stdio.h>

int main(){

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


Compiler output:
main.c: In function 'main':
main.c:13:28: error: 'k' undeclared (first use in this function)
   13 |                     if(i+j+k == x)
      |                            ^
main.c:13:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void)
{
   int n, x, i, j, k;
   int l = 0;

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

   while(1) {
      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) {
              l += 1;
            }
          }
        }
      }
   }

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





Compiler output:
main.c: In function 'main':
main.c:12:22: error: lvalue required as left operand of assignment
   12 |       if (n = 0 && x = 0) {
      |                      ^
Language: C

#include<stdio.h>

int main(void)
{
   int n, x, i, j, k;
   int l = 0;

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

   while(1) {
      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) {
              l += 1;
            }
          }
        }
      }

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





Compiler output:
main.c: In function 'main':
main.c:12:22: error: lvalue required as left operand of assignment
   12 |       if (n = 0 && x = 0) {
      |                      ^
Language: C

#include<stdio.h>

int main(void)
{
   int n, x, i, j, k;
   int l = 0;

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

   while(1) {
      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) {
              l += 1;
            }
          }
        }
      }

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





Compiler output:
main.c: In function 'main':
main.c:12:22: error: lvalue required as left operand of assignment
   12 |       if (n = 0 && x = 0) {
      |                      ^
Language: C

#include<stdio.h>

int main(void)
{
   int n, x, i, j, k;
   int l = 0;

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

   while(1) {
      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) {
              l++;
            }
          }
        }
      }
   }

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





Compiler output:
main.c: In function 'main':
main.c:12:22: error: lvalue required as left operand of assignment
   12 |       if (n = 0 && x = 0) {
      |                      ^
Language: C

#include<stdio.h>

int main(void){
   int n[],x[],i,j,k,cnt,a=0;

  do{ 
      scanf("%d %d",&n[a],&x[a]);
      a=a+1;
     }while(n[a]!=0 && n[a!=0]);
    for(i=1;i<=n;i++){
       for(j=1;j<=n;j++){
          for(k=1;k<=n;k++){
             if(i+j+k==x)
                cnt=cnt+1;
          }
       }
    }
  printf("%d",cnt);
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:8: error: array size missing in 'n'
    4 |    int n[],x[],i,j,k,cnt,a=0;
      |        ^
main.c:4:12: error: array size missing in 'x'
    4 |    int n[],x[],i,j,k,cnt,a=0;
      |            ^
main.c:10:14: warning: comparison between pointer and integer
   10 |     for(i=1;i<=n;i++){
      |              ^~
main.c:11:17: warning: comparison between pointer and integer
   11 |        for(j=1;j<=n;j++){
      |                 ^~
main.c:12:20: warning: comparison between pointer and integer
   12 |           for(k=1;k<=n;k++){
      |                    ^~
main.c:13:22: warning: comparison between pointer and integer
   13 |              if(i+j+k==x)
      |                      ^~
Language: C

#include<stdio.h>

int main(void){
   int n[],x[],i,j,k,cnt,a,b=0;

  do{ 
      scanf("%d %d",&n[a],&x[a]);
      a=a+1;
     }while(n[a-1]!=0 && n[a-1]!=0);
  b=a;
  a=0;
   
 do{
    for(i=1;i<=n[a];i++){
       for(j=1;j<=n[a];j++){
          for(k=1;k<=n[a];k++){
             if(i+j+k==x[a])
                cnt=cnt+1;
          }
       }
    }
  printf("%d",cnt);
  a=a+1;
 }while(a=b);
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:8: error: array size missing in 'n'
    4 |    int n[],x[],i,j,k,cnt,a,b=0;
      |        ^
main.c:4:12: error: array size missing in 'x'
    4 |    int n[],x[],i,j,k,cnt,a,b=0;
      |            ^
Language: C

#include<stdio.h>

int main(void){
   int n[],x[];
   int i,j,k,cnt,a,b=0;

  do{ 
      scanf("%d %d",&n[a],&x[a]);
      a=a+1;
     }while(n[a-1]!=0 && n[a-1]!=0);
  b=a;
  a=0;
   
 do{
    for(i=1;i<=n[a];i++){
       for(j=1;j<=n[a];j++){
          for(k=1;k<=n[a];k++){
             if(i+j+k==x[a])
                cnt=cnt+1;
          }
       }
    }
  printf("%d",cnt);
  a=a+1;
 }while(a=b);
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:8: error: array size missing in 'n'
    4 |    int n[],x[];
      |        ^
main.c:4:12: error: array size missing in 'x'
    4 |    int n[],x[];
      |            ^
Language: C

#include<stdio.h>

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

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

   while(1) {
　　　int l = 0;
      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) && (i != j) && (j != k) && (k != i)) {
              l++;
            }
          }
        }
      }
   }

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



Compiler output:
main.c: In function 'main':
main.c:11:1: error: stray '\343' in program
   11 | <U+3000><U+3000><U+3000>int l = 0;
      | ^~~~~~~~
main.c:11:3: error: stray '\343' in program
   11 | <U+3000><U+3000><U+3000>int l = 0;
      |         ^~~~~~~~
main.c:11:5: error: stray '\343' in program
   11 | <U+3000><U+3000><U+3000>int l = 0;
      |                 ^~~~~~~~
main.c:27:19: error: 'l' undeclared (first use in this function)
   27 |    printf("%d\n", l);
      |                   ^
main.c:27:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void)
{
   int n, x, i, j, k;
   int l = 0;

   while(1) {
　　　scanf("%d", &n);
      scanf("%d", &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) {
              l++;
            }
          }
        }
      }
   }

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



Compiler output:
main.c: In function 'main':
main.c:9:1: error: stray '\343' in program
    9 | <U+3000><U+3000><U+3000>scanf("%d", &n);
      | ^~~~~~~~
main.c:9:3: error: stray '\343' in program
    9 | <U+3000><U+3000><U+3000>scanf("%d", &n);
      |         ^~~~~~~~
main.c:9:5: error: stray '\343' in program
    9 | <U+3000><U+3000><U+3000>scanf("%d", &n);
      |                 ^~~~~~~~
Language: C

#include<stdio.h>

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

   while(1) {
      int l = 0;

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

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

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

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



Compiler output:
main.c: In function 'main':
main.c:28:19: error: 'l' undeclared (first use in this function)
   28 |    printf("%d\n", l);
      |                   ^
main.c:28:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

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

   while(1) {
      int l = 0;

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

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

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

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



Compiler output:
main.c: In function 'main':
main.c:28:19: error: 'l' undeclared (first use in this function)
   28 |    printf("%d\n", l);
      |                   ^
main.c:28:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

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

   while(1) {
      int l = 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) {
              l++;
            }
          }
        }
      }
   }

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



Compiler output:
main.c: In function 'main':
main.c:27:19: error: 'l' undeclared (first use in this function)
   27 |    printf("%d\n", l);
      |                   ^
main.c:27:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main()
{
  int n, x, i, j, k, count;
  while (true) {
    count = 0;
    scanf("%d %d", &n, &x);
    if (n == 0 && x == 0) break;
    if (n >= 3 && n <= 100) {
      if (x >= 0 && x <= 300) {
        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);
    }
  }
}



Compiler output:
main.c: In function 'main':
main.c:6:10: error: 'true' undeclared (first use in this function)
    6 |   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:6:10: note: each undeclared identifier is reported only once for each function it appears in
    6 |   while (true) {
      |          ^~~~
Language: C

#include<stdio.h>

int main()
{
   int n, x, i, j, k;
   int l = 0;
   
   scanf("%d %d", &n, &x);

   while(1) {

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

      while(y > 0) {
		r = x % y;
		x = y;
		y = r;
   }

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



Compiler output:
main.c: In function 'main':
main.c:16:13: error: 'y' undeclared (first use in this function)
   16 |       while(y > 0) {
      |             ^
main.c:16:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:17: error: 'r' undeclared (first use in this function)
   17 |                 r = x % y;
      |                 ^
main.c:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
Language: C

#include<stdio.h>

int main()
{
   int n, x, y, w;
   int l = 0;
   
   scanf("%d %d", &n, &x);

   while(1) {

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

      while(y > 0) {
		w = x % y;
		x = y;
		y = w;
   }

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



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

#include <stdio.h>

int main(){

int n,x,i,j,l,t,k,a,count[10000];


  for(a=0;a<10000;a++){
  count[a]=0;
  }
  
  while(1){
  k=0;
  scanf("%d %d\n",&n,&x);

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

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


return 0;

}
   


Compiler output:
main.c: In function 'main':
main.c:22:8: error: expected ';' before '}' token
   22 |     k++
      |        ^
      |        ;
   23 |     }
      |     ~
Language: C

#include<stdio.h>

int main(){
	int i,j,k,n,x,s,p=0;
	while(1){
		scanf("%d %d",&n,&x);
		if(n==0 && x==0)break;
		for(i=1;i<=n-2;i++){
			if(i>=x)break;
			for(j=2;j<=n-1;j++){
				if(i>=x)break;
				if(j=i)continue;
				for(k=3;k<=n;k++){
					if(k>=x)break;
					if(k=i || k=j)continue;
					s=i+j+k;
					if(s==x)p++;
				}
			}
		}
	}
	printf("%d\n",p);
	
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:15:52: error: lvalue required as left operand of assignment
   15 |                                         if(k=i || k=j)continue;
      |                                                    ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:12:33: error: expected ';' before '}' token
   12 |      if(i+j+k == x){cnt = cnt +1}
      |                                 ^
      |                                 ;
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:11:44: error: expected statement before ')' token
   11 |      if(i+j+k == x && i!=j && j!=k && k!=i)){cnt = cnt +1;}
      |                                            ^
Language: C

#include<stdio.h>
int main(){
 int i,j,k,n,x,cnt;
 while(1){
  cnt=0;
  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+2; k<n+1;k++){
     if(i+j+k == x){cnt++;}
    }
   }
  }
  printf("%d\n", cnt);
 }
 return 0;
}

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

#include <stdio.h>

int main(){
    int n, x;
    int a, b, c, ans;
    while(1){
        scanf("%d%d", &n, &x);
        if(n == 0 && x == 0){break;}
        
        ans = 0;
        for(a = 1; a <= n; a++){
            for(b = 1; b <= n; b++){
                for(c = 1; c <= n; c++){
                    if(a == b || b == c || c == a){
                        continue;
                    }
                    if(x == a + b + c){
                        printf("%d")
                        ans++;
                    }
                }
            }    
        }
        
        printf("%d\n",ans);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:37: error: expected ';' before 'ans'
   18 |                         printf("%d")
      |                                     ^
      |                                     ;
   19 |                         ans++;
      |                         ~~~
Language: C

#include<stdio.h>

int main(void){
	
	int n,x;
	
	while(1){
		scanf("%d %d",&n,&x);
		
		

Compiler output:
main.c: In function 'main':
main.c:8:17: error: expected declaration or statement at end of input
    8 |                 scanf("%d %d",&n,&x);
      |                 ^~~~~
main.c:8:17: error: expected declaration or statement at end of input
Language: C

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

while(1){
scanf("%d %d",&n,&x);

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

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

Compiler output:
main.c: In function 'main':
main.c:8:19: error: 'x' undeclared (first use in this function)
    8 | scanf("%d %d",&n,&x);
      |                   ^
main.c:8:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

while(1){
scanf("%d %d",&n,&x);

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

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

Compiler output:
main.c: In function 'main':
main.c:8:19: error: 'x' undeclared (first use in this function)
    8 | scanf("%d %d",&n,&x);
      |                   ^
main.c:8:19: note: each undeclared identifier is reported only once for each function it appears in