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


#include<stdio.h>
int main(){
int i,j,k;
int n,x,s;
while(scanf("%d %d",&n,&x),n>0){
s=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){

++s;
}
}
}
}
printf(???%d?\n???,s);
}
return 0;}

Compiler output:
main.c: In function 'main':
main.c:22:8: error: expected expression before '?' token
   22 | printf(???%d?\n???,s);
      |        ^
main.c:22:14: error: stray '\' in program
   22 | printf(???%d?\n???,s);
      |              ^
Language: C

#include<stdio.h>

int main(){

  int n, x;
  int count=0;

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

  while(true){
    if (n==0 && z==0)
      break;

  for(int i=0; i<=n; i++){
    for(int j=i+1; j<=n; j++){
      for(int 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:10:9: error: 'true' undeclared (first use in this function)
   10 |   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:10:9: note: each undeclared identifier is reported only once for each function it appears in
   10 |   while(true){
      |         ^~~~
main.c:11:17: error: 'z' undeclared (first use in this function)
   11 |     if (n==0 && z==0)
      |                 ^
main.c:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
Language: C

#include <stdio.h>
int main()
{
 int n,x,a,b,c,i,j,k,v;
 scanf(%d %d,&n &x);
 
 i=j=k=1;

while{
       for (i=1, i<=a, i++){
          for (j=1, j<=a, j++ ){
             for (k=1; k<=a; k++ ){
                if(i+j+k==n)  v++;
   }
  }
 }
 
 if(n==0 && x==0) {break ;}

printf("%d",v);

return0;
}

Compiler output:
main.c: In function 'main':
main.c:5:8: error: expected expression before '%' token
    5 |  scanf(%d %d,&n &x);
      |        ^
main.c:9:6: error: expected '(' before '{' token
    9 | while{
      |      ^
      |      (
main.c:10:27: error: expected expression before ')' token
   10 |        for (i=1, i<=a, i++){
      |                           ^
main.c:11:30: error: expected ';' before ')' token
   11 |           for (j=1, j<=a, j++ ){
      |                              ^~
      |                              ;
main.c:11:31: error: expected expression before ')' token
   11 |           for (j=1, j<=a, j++ ){
      |                               ^
main.c:22:1: error: 'return0' undeclared (first use in this function)
   22 | return0;
      | ^~~~~~~
main.c:22:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

#incude <stdio.h>

int main() {

   int x, n, a, i, j;

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

   while(n == 0 && x == 0) {
      
      a = 0;
      for (i = 1; i <= x / 3 ; ++i) {

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

   return 0;
}

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

#include<stdio.h>

int main(){

  int n, x;
  int count=0;

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

  while(true){
    if (n==0 && x==0)
      break;

  for(int i=0; i<=n; i++){
    for(int j=i+1; j<=n; j++){
      for(int 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:10:9: error: 'true' undeclared (first use in this function)
   10 |   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:10:9: note: each undeclared identifier is reported only once for each function it appears in
   10 |   while(true){
      |         ^~~~
main.c:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
Language: C

#include <stdio.h>
int main()
{
 int n,x,a,b,c,i,j,k,v;
 scanf(%d %d,&n &x);
 
 i=1;
 j=1;
 k=1;

while{
       for (i=1, i<=a, i++){
          for (j=1, j<=a, j++ ){
             for (k=1; k<=a; k++ ){
                if(i+j+k==n)  v++;
   }
  }
 }
 
 if(n==0 && x==0) {break ;}

printf("%d",v);

return0;
}

Compiler output:
main.c: In function 'main':
main.c:5:8: error: expected expression before '%' token
    5 |  scanf(%d %d,&n &x);
      |        ^
main.c:11:6: error: expected '(' before '{' token
   11 | while{
      |      ^
      |      (
main.c:12:27: error: expected expression before ')' token
   12 |        for (i=1, i<=a, i++){
      |                           ^
main.c:13:30: error: expected ';' before ')' token
   13 |           for (j=1, j<=a, j++ ){
      |                              ^~
      |                              ;
main.c:13:31: error: expected expression before ')' token
   13 |           for (j=1, j<=a, j++ ){
      |                               ^
main.c:24:1: error: 'return0' undeclared (first use in this function)
   24 | return0;
      | ^~~~~~~
main.c:24:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:1: error: expected declaration or statement at end of input
   25 | }
      | ^
Language: C

#include<stdio.h>

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

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

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

   return 0;
 }
 

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

#include<stdio.h>

int main(){

  int n, x;
  int count=0;

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

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

  for(int i=0; i<=n; i++){
    for(int j=i+1; j<=n; j++){
      for(int 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:10:12: error: expected expression before '=' token
   10 |   while(n!==0 && x!==0){
      |            ^
main.c:25:1: error: expected declaration or statement at end of input
   25 | }
      | ^
Language: C

#include <stdio.h>
int main()
{
 int n,x,a,b,c,i,j,k,v;
 scanf(%d %d,&n &x);
 v=0;

while(1){
       for (i=1, i<=a, i++){
          for (j=1, j<=a, j++ ){
             for (k=1; k<=a; k++ ){
                if(i+j+k==n)  v++;
   }
  }
 }
 
 if(n==0 && x==0) {break ;}

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

return0;
}

Compiler output:
main.c: In function 'main':
main.c:5:8: error: expected expression before '%' token
    5 |  scanf(%d %d,&n &x);
      |        ^
main.c:9:27: error: expected ';' before ')' token
    9 |        for (i=1, i<=a, i++){
      |                           ^
      |                           ;
main.c:9:27: error: expected expression before ')' token
main.c:10:30: error: expected ';' before ')' token
   10 |           for (j=1, j<=a, j++ ){
      |                              ^~
      |                              ;
main.c:10:31: error: expected expression before ')' token
   10 |           for (j=1, j<=a, j++ ){
      |                               ^
main.c:21:1: error: 'return0' undeclared (first use in this function)
   21 | return0;
      | ^~~~~~~
main.c:21:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:1: error: expected declaration or statement at end of input
   22 | }
      | ^
Language: C

#include<stdio.h>

int main(){

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

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

  while(1){

  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){
          count++;
        }
      }
    }
  }

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

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

  return 0;
}

  
  

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

#include <stdio.h>
int main(void)
{
 int n,x,a,b,c,i,j,k,v;
 scanf(%d %d,&n &x);
 v=0;

while(1){
       for (i=1, i<=a, i++){
          for (j=i+1, j<=a, j++ ){
             for (k=j+1; k<=a; k++ ){
                if(i+j+k==n)  v++;
   }
  }
 }
 
 if(n==0 && x==0) {break ;}

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

return0;
}

Compiler output:
main.c: In function 'main':
main.c:5:8: error: expected expression before '%' token
    5 |  scanf(%d %d,&n &x);
      |        ^
main.c:9:27: error: expected ';' before ')' token
    9 |        for (i=1, i<=a, i++){
      |                           ^
      |                           ;
main.c:9:27: error: expected expression before ')' token
main.c:10:32: error: expected ';' before ')' token
   10 |           for (j=i+1, j<=a, j++ ){
      |                                ^~
      |                                ;
main.c:10:33: error: expected expression before ')' token
   10 |           for (j=i+1, j<=a, j++ ){
      |                                 ^
main.c:21:1: error: 'return0' undeclared (first use in this function)
   21 | return0;
      | ^~~~~~~
main.c:21:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:1: error: expected declaration or statement at end of input
   22 | }
      | ^
Language: C

#include <stdio.h>
int main(void)
{
 int n,x,a,b,c,i,j,k,v;
 scanf("%d %d",&n, &x);
 v=0;

while(1){
       for (i=1, i<=a, i++){
          for (j=i+1, j<=a, j++ ){
             for (k=j+1; k<=a; k++ ){
                if(i+j+k==n)  v++;
   }
  }
 }
 
 if(n==0 && x==0) {break ;}

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

return0;
}

Compiler output:
main.c: In function 'main':
main.c:9:27: error: expected ';' before ')' token
    9 |        for (i=1, i<=a, i++){
      |                           ^
      |                           ;
main.c:9:27: error: expected expression before ')' token
main.c:10:32: error: expected ';' before ')' token
   10 |           for (j=i+1, j<=a, j++ ){
      |                                ^~
      |                                ;
main.c:10:33: error: expected expression before ')' token
   10 |           for (j=i+1, j<=a, j++ ){
      |                                 ^
main.c:21:1: error: 'return0' undeclared (first use in this function)
   21 | return0;
      | ^~~~~~~
main.c:21:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:1: error: expected declaration or statement at end of input
   22 | }
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:7:6: error: expected '(' before '{' token
    7 | while{
      |      ^
      |      (
main.c:12:42: error: expected ';' before '}' token
   12 |            printf("%d %d %d\n",i,j,k);++v
      |                                          ^
      |                                          ;
   13 | }
      | ~
Language: C

#include <stdio.h>

int main() {

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

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

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

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:29: error: expected ';' before 'j'
   14 |               for (k = j + 1 j <= n; ++k){
      |                             ^~
      |                             ;
main.c:14:41: error: expected ';' before ')' token
   14 |               for (k = j + 1 j <= n; ++k){
      |                                         ^
      |                                         ;
Language: C

#include<stdio.h>


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

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

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


    return 0;
}

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

#include <stdio.h>
int main(void)
{
 int n,x,a,b,c,i,j,k,v;
 scanf("%d %d",&n, &x);
 v=0;

while(1){
       for (i=1, i<=a-1, i++){
          for (j=i+1, j<=a, j++ ){
             for (k=j+1; k<=a; k++ ){
                if(i+j+k==n)  v++;
   }
  }
 }
 
 if(n==0 && x==0) {break ;}

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

return0;
}

Compiler output:
main.c: In function 'main':
main.c:9:29: error: expected ';' before ')' token
    9 |        for (i=1, i<=a-1, i++){
      |                             ^
      |                             ;
main.c:9:29: error: expected expression before ')' token
main.c:10:32: error: expected ';' before ')' token
   10 |           for (j=i+1, j<=a, j++ ){
      |                                ^~
      |                                ;
main.c:10:33: error: expected expression before ')' token
   10 |           for (j=i+1, j<=a, j++ ){
      |                                 ^
main.c:21:1: error: 'return0' undeclared (first use in this function)
   21 | return0;
      | ^~~~~~~
main.c:21:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:1: error: expected declaration or statement at end of input
   22 | }
      | ^
Language: C

#include <stdio.h>
int main(void)
{
 int n,x,a,b,c,i,j,k,v;
 scanf("%d %d",&n, &x);
 v=0;

while(1){
       for (i=1, i<=n-1, i++){
          for (j=i+1, j<=n, j++ ){
             for (k=j+1; k<=n; k++ ){
                if(i+j+k==n)  v++;
   }
  }
 }
 
 if(n==0 && x==0) {break ;}

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

return0;
}

Compiler output:
main.c: In function 'main':
main.c:9:29: error: expected ';' before ')' token
    9 |        for (i=1, i<=n-1, i++){
      |                             ^
      |                             ;
main.c:9:29: error: expected expression before ')' token
main.c:10:32: error: expected ';' before ')' token
   10 |           for (j=i+1, j<=n, j++ ){
      |                                ^~
      |                                ;
main.c:10:33: error: expected expression before ')' token
   10 |           for (j=i+1, j<=n, j++ ){
      |                                 ^
main.c:21:1: error: 'return0' undeclared (first use in this function)
   21 | return0;
      | ^~~~~~~
main.c:21:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:1: error: expected declaration or statement at end of input
   22 | }
      | ^
Language: C

#include <stdio.h>
int main(void)
{
 int n,x,a,b,c,i,j,k,v;
 scanf("%d %d",&n, &x);
 v=0;

while(1){
       for (i=1, i<=n-1, i++){
          for (j=i+1, j<=n, j++ ){
             for (k=j+1; k<=n; k++ ){
                if(i+j+k==n)  v++;
   }
  }
 }
}
 
 if(n==0 && x==0) {break ;}

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

return0;
}

Compiler output:
main.c: In function 'main':
main.c:9:29: error: expected ';' before ')' token
    9 |        for (i=1, i<=n-1, i++){
      |                             ^
      |                             ;
main.c:9:29: error: expected expression before ')' token
main.c:10:32: error: expected ';' before ')' token
   10 |           for (j=i+1, j<=n, j++ ){
      |                                ^~
      |                                ;
main.c:10:33: error: expected expression before ')' token
   10 |           for (j=i+1, j<=n, j++ ){
      |                                 ^
main.c:18:20: error: break statement not within loop or switch
   18 |  if(n==0 && x==0) {break ;}
      |                    ^~~~~
main.c:22:1: error: 'return0' undeclared (first use in this function)
   22 | return0;
      | ^~~~~~~
main.c:22:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(void)
{
  int x,n,i,j,k,z;
  z=0;
  scanf("%d %d",&x,&n);

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

Compiler output:
main.c: In function 'main':
main.c:9:5: error: break statement not within loop or switch
    9 |     break;
      |     ^~~~~
Language: C

#include <stdio.h>
int main(void)
{
 int n,x,a,b,c,i,j,k,v;
 scanf("%d %d",&n, &x);
 v=0;

while(1){
       for (i=1, i<=n-1, i++){
          for (j=i+1, j<=n, j++ ){
             for (k=j+1; k<=n+1; k++ ){
                if(i+j+k==n)  v++;
   }
  }
 }
}
 
 if(n==0 && x==0) {break ;}

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

return0;
}

Compiler output:
main.c: In function 'main':
main.c:9:29: error: expected ';' before ')' token
    9 |        for (i=1, i<=n-1, i++){
      |                             ^
      |                             ;
main.c:9:29: error: expected expression before ')' token
main.c:10:32: error: expected ';' before ')' token
   10 |           for (j=i+1, j<=n, j++ ){
      |                                ^~
      |                                ;
main.c:10:33: error: expected expression before ')' token
   10 |           for (j=i+1, j<=n, j++ ){
      |                                 ^
main.c:18:20: error: break statement not within loop or switch
   18 |  if(n==0 && x==0) {break ;}
      |                    ^~~~~
main.c:22:1: error: 'return0' undeclared (first use in this function)
   22 | return0;
      | ^~~~~~~
main.c:22:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(void)
{
  int x,n,i,j,k,z;
  z=0;
  scanf("%d %d",&x,&n);

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

Compiler output:
main.c: In function 'main':
main.c:9:5: error: break statement not within loop or switch
    9 |     break;
      |     ^~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:9:7: error: expected ';' before 'for'
    9 | v == 0
      |       ^
      |       ;
   10 | for(i = 1;  i <=a;i++){
      | ~~~    
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
Language: C

#include <stdio.h>
int main(void)
{
  int x,n,i,j,k,z;
  z=0;
  scanf("%d %d",&x,&n);

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

Compiler output:
main.c: In function 'main':
main.c:8:3: error: 'else' without a previous 'if'
    8 |   else{
      |   ^~~~
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
Language: C

#include <stdio.h>
int main(void)
{
 int n,x,a,b,c,i,j,k,v;
 scanf("%d %d",&n, &x);
 v=0;

while(1){
       for (i=1, i<=n-1, i++){
          for (j=i+1, j<=n, j++ ){
             for (k=j+1; k<=n+1; k++ ){
                if(i+j+k==n)  v++;
   }
  }
 }
}
 
 if(n==0 && x==0) {break ;}

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:29: error: expected ';' before ')' token
    9 |        for (i=1, i<=n-1, i++){
      |                             ^
      |                             ;
main.c:9:29: error: expected expression before ')' token
main.c:10:32: error: expected ';' before ')' token
   10 |           for (j=i+1, j<=n, j++ ){
      |                                ^~
      |                                ;
main.c:10:33: error: expected expression before ')' token
   10 |           for (j=i+1, j<=n, j++ ){
      |                                 ^
main.c:18:20: error: break statement not within loop or switch
   18 |  if(n==0 && x==0) {break ;}
      |                    ^~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:7: error: expected ';' before 'for'
   10 | v == 0
      |       ^
      |       ;
   11 | for(i = 1;  i <=a;i++){
      | ~~~    
main.c:22:1: error: expected declaration or statement at end of input
   22 | }
      | ^
Language: C

#include <stdio.h>
int main(void)
{
 int n,x,a,b,c,i,j,k,v;
 scanf("%d %d",&n, &x);
 v=0;

while(1){
       for (i=1, i<=n-1, i++){
          for (j=i+1, j<=n, j++ ){
             for (k=j+1; k<=n+1; k++ ){
                if(i+j+k==x)  v++;
   }
  }
 }
}
 
 if(n==0 && x==0) {break ;}

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:29: error: expected ';' before ')' token
    9 |        for (i=1, i<=n-1, i++){
      |                             ^
      |                             ;
main.c:9:29: error: expected expression before ')' token
main.c:10:32: error: expected ';' before ')' token
   10 |           for (j=i+1, j<=n, j++ ){
      |                                ^~
      |                                ;
main.c:10:33: error: expected expression before ')' token
   10 |           for (j=i+1, j<=n, j++ ){
      |                                 ^
main.c:18:20: error: break statement not within loop or switch
   18 |  if(n==0 && x==0) {break ;}
      |                    ^~~~~
Language: C

#include<stdio.h>

int main() {

   int n, x, i, j, k;
   int count = 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 + 1; k <= n; k++){
            if ((i + j + k) == x)
                  count++;
         }
      }
   }
   printf("%d\n", count/6);

}

Compiler output:
main.c: In function 'main':
main.c:10:7: error: break statement not within loop or switch
   10 |       break;
      |       ^~~~~
Language: C

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

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

#include <stdio.h>
int main(void)
{
 int n,x,a,b,c,i,j,k,v;
 scanf("%d %d",&n, &x);

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

 v=0;

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:19: error: break statement not within loop or switch
    7 | if(n==0 && x==0) {break ;}
      |                   ^~~~~
main.c:12:29: error: expected ';' before ')' token
   12 |        for (i=1, i<=n-1, i++){
      |                             ^
      |                             ;
main.c:12:29: error: expected expression before ')' token
main.c:13:32: error: expected ';' before ')' token
   13 |           for (j=i+1, j<=n, j++ ){
      |                                ^~
      |                                ;
main.c:13:33: error: expected expression before ')' token
   13 |           for (j=i+1, j<=n, j++ ){
      |                                 ^
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

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

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

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

#include <stdio.h>
int main(void)
{
 int n,x,a,b,c,i,j,k,v;
 scanf("%d %d",&n, &x);

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

 v=0;

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:19: error: break statement not within loop or switch
    7 | if(n==0 && x==0) {break ;}
      |                   ^~~~~
main.c:12:29: error: expected ';' before ')' token
   12 |        for (i=1, i<=n-1, i++){
      |                             ^
      |                             ;
main.c:12:29: error: expected expression before ')' token
main.c:13:32: error: expected ';' before ')' token
   13 |           for (j=i+1, j<=n, j++ ){
      |                                ^~
      |                                ;
main.c:13:33: error: expected expression before ')' token
   13 |           for (j=i+1, j<=n, j++ ){
      |                                 ^
Language: C

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

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

    

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

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

    

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

#include <stdio.h>

int main (void)
{

int n,x,v=0;

while(1){

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

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

    if(i + j + k == x){

  printf("%d%d %d\n",i,j,k);

      }
    }
  }
  
  printf("????????????????????°%d\n"v);

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

  return 0;

  }

Compiler output:
main.c: In function 'main':
main.c:24:37: error: expected ')' before 'v'
   24 |   printf("????????????????????°%d\n"v);
      |         ~                           ^
      |                                     )
main.c:31:3: error: expected declaration or statement at end of input
   31 |   }
      |   ^
Language: C

#include<stdio.h>

int main(void) {

   int n, x, i, j, k;
   int count = 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 + 1; k <= n; k++){
            if (i + j + k == x)
                  count++;
         }
      }
   }
   printf("%d\n", count);

}

Compiler output:
main.c: In function 'main':
main.c:10:7: error: break statement not within loop or switch
   10 |       break;
      |       ^~~~~
Language: C

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

    

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

#include<stdio.h>
int main(void)
{
int a,x,i,j,k,v;
while(1){
scanf("%d %d", &a,&x);
if(a==0&&x==0){
break;
}
v == 0;
for(i = 1;  i <=a;i++){
 for(j = i+1;  j <=a;j++){
  for(k = j+1;  k <=a;k++){
        if(x ==i + j  +  k)
          ++v;

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

    

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

#include <stdio.h>
int main(void)
{
 int n,x,a,b,c,i,j,k,v;
 scanf("%d %d",&n, &x);

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

 v=0;

while(1){
       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)  v++;
   }
  }
 }
 
   printf("%d\n",v);
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:19: error: break statement not within loop or switch
    7 | if(n==0 && x==0) {break ;}
      |                   ^~~~~
main.c:12:29: error: expected ';' before ')' token
   12 |        for (i=1, i<=n-2, i++){
      |                             ^
      |                             ;
main.c:12:29: error: expected expression before ')' token
main.c:13:27: error: lvalue required as left operand of assignment
   13 |           for (j=i+1, j<=n=1, j++ ){
      |                           ^
main.c:13:34: error: expected ';' before ')' token
   13 |           for (j=i+1, j<=n=1, j++ ){
      |                                  ^~
      |                                  ;
main.c:13:35: error: expected expression before ')' token
   13 |           for (j=i+1, j<=n=1, j++ ){
      |                                   ^
Language: C

#include <stdio.h>
int main(void)
{
  int x,n,i,j,k,z;
  z=0;
  scanf("%d %d",&x,&n);

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

Compiler output:
main.c: In function 'main':
main.c:9:5: error: break statement not within loop or switch
    9 |     break;
      |     ^~~~~
Language: C

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

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

    

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

#include <stdio.h>
int main(void)
{
 int n,x,i,j,k,v;
 scanf("%d %d",&n, &x);

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

 v=0;

while(1){
       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)  v++;
   }
  }
 }
 
   printf("%d\n",v);
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:19: error: break statement not within loop or switch
    7 | if(n==0 && x==0) {break ;}
      |                   ^~~~~
main.c:12:29: error: expected ';' before ')' token
   12 |        for (i=1, i<=n-2, i++){
      |                             ^
      |                             ;
main.c:12:29: error: expected expression before ')' token
main.c:13:34: error: expected ';' before ')' token
   13 |           for (j=i+1, j<=n-1, j++ ){
      |                                  ^~
      |                                  ;
main.c:13:35: error: expected expression before ')' token
   13 |           for (j=i+1, j<=n-1, j++ ){
      |                                   ^
Language: C

#include <stdio.h>
int main(void)
{
  int x,n,i,j,k,z;
  z=0;
  scanf("%d %d",&x,&n);

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

Compiler output:
main.c: In function 'main':
main.c:9:5: error: break statement not within loop or switch
    9 |     break;
      |     ^~~~~
Language: C

#include <stdio.h>

int main (void)
{

int n,x,v=0;

while(1){

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

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

    if(i + j + k == x){

  printf("%d %d %d\n",i,j,k);

      }
    }
  }
  
  printf("????????????????????°%d\n"v);

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

  return 0;

  }

Compiler output:
main.c: In function 'main':
main.c:24:37: error: expected ')' before 'v'
   24 |   printf("????????????????????°%d\n"v);
      |         ~                           ^
      |                                     )
main.c:31:3: error: expected declaration or statement at end of input
   31 |   }
      |   ^
Language: C

#include <stdio.h>

int main (void)
{

int n,x,v=0;

while(1){

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

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

    if(i + j + k == x){

  printf("%d %d %d\n",i,j,k);

      }
    }
  }
  
  printf("%d\n"v);

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

  return 0;

  }

Compiler output:
main.c: In function 'main':
main.c:24:16: error: expected ')' before 'v'
   24 |   printf("%d\n"v);
      |         ~      ^
      |                )
main.c:31:3: error: expected declaration or statement at end of input
   31 |   }
      |   ^
Language: C

#include <stdio.h>

int main (void)
{

int n,x,v=0;

while(1){

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

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

    if(i + j + k == x){

  printf("%d %d %d\n",i,j,k);

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

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

  return 0;

  }

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

#include <stdio.h>

int main (void)
{

int n,x,v=0;

while(1){

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

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

    if(i + j + k == x){

  printf("%d %d %d\n",i,j,k);

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

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

  return 0;

  }

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

#include <stdio.h>

int main (void)
{

int n,x,v=0;

while(1){

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

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

    if(i + j + k == x){

  printf("%d %d %d\n",i,j,k);

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

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

  return 0;

  }

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

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

Compiler output:
main.c: In function 'main':
main.c:8:6: error: break statement not within loop or switch
    8 |      break;
      |      ^~~~~
Language: C

#include <stdio.h>
int main(void)
{
 int n,x,i,j,k,v;
 
if(n==0 && x==0) {break ;}

 v=0;

while(1){

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

       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)  v++;
   }
  }
 }
 
   printf("%d\n",v);
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:19: error: break statement not within loop or switch
    6 | if(n==0 && x==0) {break ;}
      |                   ^~~~~
main.c:14:29: error: expected ';' before ')' token
   14 |        for (i=1, i<=n-2, i++){
      |                             ^
      |                             ;
main.c:14:29: error: expected expression before ')' token
main.c:15:34: error: expected ';' before ')' token
   15 |           for (j=i+1, j<=n-1, j++ ){
      |                                  ^~
      |                                  ;
main.c:15:35: error: expected expression before ')' token
   15 |           for (j=i+1, j<=n-1, j++ ){
      |                                   ^
Language: C

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

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

    

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

#include <stdio.h>
int main(void)
{
 int n,x,i,j,k,v;
 
while(1){
if(n==0 && x==0) {break ;}

 v=0;


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

       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)  v++;
   }
  }
 }
 
   printf("%d\n",v);
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:29: error: expected ';' before ')' token
   14 |        for (i=1, i<=n-2, i++){
      |                             ^
      |                             ;
main.c:14:29: error: expected expression before ')' token
main.c:15:34: error: expected ';' before ')' token
   15 |           for (j=i+1, j<=n-1, j++ ){
      |                                  ^~
      |                                  ;
main.c:15:35: error: expected expression before ')' token
   15 |           for (j=i+1, j<=n-1, j++ ){
      |                                   ^
Language: C

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

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

    

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

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

     }
  }
}

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

    

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

#include <stdio.h>

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

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

  while(n != 0 && x != 0) {
  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)
          sum[a] = sum[a] + 1;
      }
    }
  }
  a = a + 1;
  scanf("%d %d", &n, &x);
  }

  for(i = 0; i < a; i++) {
    printf("%d\n", sum[a]);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:14: error: subscripted value is neither array nor pointer nor vector
   17 |           sum[a] = sum[a] + 1;
      |              ^
main.c:17:23: error: subscripted value is neither array nor pointer nor vector
   17 |           sum[a] = sum[a] + 1;
      |                       ^
main.c:26:23: error: subscripted value is neither array nor pointer nor vector
   26 |     printf("%d\n", sum[a]);
      |                       ^
Language: C

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

     }
  }
}

 printf("%d\n",v);
}
 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(void)
{
 int n,x,i,j,k,v;
 
while(1){
   scanf("%d %d",&n, &x);
   if(n==0 && x==0) {break ;}
   v=0;

       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)  v++;
   }
  }
 }
 
   printf("%d\n",v);
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:29: error: expected ';' before ')' token
   11 |        for (i=1, i<=n-2, i++){
      |                             ^
      |                             ;
main.c:11:29: error: expected expression before ')' token
main.c:12:34: error: expected ';' before ')' token
   12 |           for (j=i+1, j<=n-1, j++ ){
      |                                  ^~
      |                                  ;
main.c:12:35: error: expected expression before ')' token
   12 |           for (j=i+1, j<=n-1, j++ ){
      |                                   ^
Language: C

#include <stdio.h>

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

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

  while(n != 0 && x != 0) {
  sum = 0;
  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)
          sum = sum + 1;
      }
    }
  }
  printf("%d\n", sum);
  scanf("%d %d, &n, &x);
  a = a + 1;
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:9: warning: missing terminating " character
   23 |   scanf("%d %d, &n, &x);
      |         ^
main.c:23:9: error: missing terminating " character
   23 |   scanf("%d %d, &n, &x);
      |         ^~~~~~~~~~~~~~~~
main.c:24:12: error: expected ')' before ';' token
   24 |   a = a + 1;
      |            ^
      |            )
main.c:23:8: note: to match this '('
   23 |   scanf("%d %d, &n, &x);
      |        ^
main.c:24:5: error: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
   24 |   a = a + 1;
      |   ~~^~~~~~~
      |     |
      |     int
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'int'
  428 | extern int scanf (const char *__restrict __format, ...) __wur;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:24:13: error: expected ';' before '}' token
   24 |   a = a + 1;
      |             ^
      |             ;
   25 |   }
      |   ~
Language: C

#include <stdio.h>

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

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

  while(n != 0 && x != 0) {
  sum = 0;
  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)
          sum = sum + 1;
      }
    }
  }
  printf("%d\n", sum);
  scanf("%d %d, &n, &x);
  a = a + 1;
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:9: warning: missing terminating " character
   23 |   scanf("%d %d, &n, &x);
      |         ^
main.c:23:9: error: missing terminating " character
   23 |   scanf("%d %d, &n, &x);
      |         ^~~~~~~~~~~~~~~~
main.c:24:12: error: expected ')' before ';' token
   24 |   a = a + 1;
      |            ^
      |            )
main.c:23:8: note: to match this '('
   23 |   scanf("%d %d, &n, &x);
      |        ^
main.c:24:5: error: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
   24 |   a = a + 1;
      |   ~~^~~~~~~
      |     |
      |     int
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'int'
  428 | extern int scanf (const char *__restrict __format, ...) __wur;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:24:13: error: expected ';' before '}' token
   24 |   a = a + 1;
      |             ^
      |             ;
   25 |   }
      |   ~
Language: C

#include <stdio.h>

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

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

  while(n != 0 && x != 0) {
  sum = 0;
  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)
          sum = sum + 1;
      }
    }
  }
  printf("%d\n", sum);
  scanf("%d %d, &n, &x);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:9: warning: missing terminating " character
   23 |   scanf("%d %d, &n, &x);
      |         ^
main.c:23:9: error: missing terminating " character
   23 |   scanf("%d %d, &n, &x);
      |         ^~~~~~~~~~~~~~~~
main.c:24:3: error: expected expression before '}' token
   24 |   }
      |   ^
main.c:23:9: error: expected ';' before '}' token
   23 |   scanf("%d %d, &n, &x);
      |         ^
      |         ;
   24 |   }
      |   ~
Language: C

#include<stdio.h>

int main(void) {

   int n, x, i, j, k;
   int count = 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 + 1; k <= n; k++){
            if (i + j + k == x)
                  count++;
         }
      }
   }
   printf("%d\n", count);

}

Compiler output:
main.c: In function 'main':
main.c:10:7: error: break statement not within loop or switch
   10 |       break;
      |       ^~~~~
Language: C

#include<stdio.h>

int main(void) {

   int n, x, i, j, k;
   int count = 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 (i + j + k == x)
                  count++;
            }
         }
      }
   printf("%d\n", count);
   }

}
}

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

#include<stdio.h>

int main(void) {

   int n, x, i, j, k;
   int count = 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 (i + j + k == x)
                  count++;
            }
         }
      }
   printf("%d\n", count);
   }

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

#include<Stdio.h>

int main() 
{
  int x,n,ans,i,j,k;
  scanf("%d %d",&n,&x);
  while(n != 0 && x != 0) {
    ans = 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){
            ans++;
          }
        }
      }
    }
    printf("%d?\n",ans);
    scanf("%d %d",&n,&x);
    }
    return 0;
}

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