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

#include <stdio.h>

int main(void)
{
  int n,x;
  int i,j,k;
  int sum = 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:9:9: error: expected expression before '?' token
    9 |   scanf(???%d %d???, &n,&x);
      |         ^
main.c:22:12: error: expected expression before '?' token
   22 |     printf(???%d\n???, sum);
      |            ^
main.c:22:17: error: stray '\' in program
   22 |     printf(???%d\n???, sum);
      |                 ^
main.c:23:11: error: expected expression before '?' token
   23 |     scanf(???%d %d???, &n, &x);
      |           ^
main.c: At top level:
main.c:26:3: error: expected identifier or '(' before 'return'
   26 |   return 0;
      |   ^~~~~~
main.c:27:1: error: expected identifier or '(' before '}' token
   27 | }
      | ^
Language: C

#include <stdio.h>

int main(void)
{
  int n,x;
  int i,j,k;
  int sum = 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:9:9: error: expected expression before '?' token
    9 |   scanf(???%d %d???, &n,&x);
      |         ^
main.c:21:12: error: expected expression before '?' token
   21 |     printf(???%d\n???, sum);
      |            ^
main.c:21:17: error: stray '\' in program
   21 |     printf(???%d\n???, sum);
      |                 ^
main.c:22:11: error: expected expression before '?' token
   22 |     scanf(???%d %d???, &n, &x);
      |           ^
main.c: At top level:
main.c:26:3: error: expected identifier or '(' before 'return'
   26 |   return 0;
      |   ^~~~~~
main.c:27:1: error: expected identifier or '(' before '}' token
   27 | }
      | ^
Language: C

#include <stdio.h>

int main(void)
{
  int n,x;
  int i,j,k;
  int sum = 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:9:9: error: expected expression before '?' token
    9 |   scanf(???%d %d???, &n,&x);
      |         ^
main.c:21:12: error: expected expression before '?' token
   21 |     printf(???%d\n???, sum);
      |            ^
main.c:21:17: error: stray '\' in program
   21 |     printf(???%d\n???, sum);
      |                 ^
main.c:22:11: error: expected expression before '?' token
   22 |     scanf(???%d %d???, &n, &x);
      |           ^
Language: C

#include <stdio.h>

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

  while(true) {
    scanf(???%d %d???, &n, &x);

    sum = 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)
           sum = sum + 1;

    printf(???%d???, sum);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: 'true' undeclared (first use in this function)
    9 |   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:9:9: note: each undeclared identifier is reported only once for each function it appears in
    9 |   while(true) {
      |         ^~~~
main.c:10:11: error: expected expression before '?' token
   10 |     scanf(???%d %d???, &n, &x);
      |           ^
main.c:23:12: error: expected expression before '?' token
   23 |     printf(???%d???, sum);
      |            ^
Language: C

#include <stdio.h>

int main(void)
{
  int n, x;
  int i,j,k;
  int sum;
  int t = 1;

  while(t = 1) {
    scanf(???%d %d???, &n, &x);

    sum = 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)
           sum = sum + 1;

    printf(???%d???, sum);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:11: error: expected expression before '?' token
   11 |     scanf(???%d %d???, &n, &x);
      |           ^
main.c:24:12: error: expected expression before '?' token
   24 |     printf(???%d???, sum);
      |            ^
Language: C

#include <stdio.h>

int main(void)
{
  int n, x;
  int i,j,k;
  int sum;
  int t = 1;

  while(t == 1) {
    scanf(???%d %d???, &n, &x);

    sum = 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)
           sum = sum + 1;

    printf(???%d???, sum);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:11: error: expected expression before '?' token
   11 |     scanf(???%d %d???, &n, &x);
      |           ^
main.c:24:12: error: expected expression before '?' token
   24 |     printf(???%d???, sum);
      |            ^
Language: C

#include <stdio.h>

int main(void)
{
  int n, x;
  int i,j,k;
  int sum;
  int t = 1;

  while(t == 1) {
    scanf(???%d%d???, &n, &x);

    sum = 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)
           sum = sum + 1;

    printf(???%d???, sum);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:11: error: expected expression before '?' token
   11 |     scanf(???%d%d???, &n, &x);
      |           ^
main.c:24:12: error: expected expression before '?' token
   24 |     printf(???%d???, sum);
      |            ^
Language: C

#include <stdio.h>

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

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

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

      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 = x) {
                  wa = wa+1;
               }
      }
   }
   printf("%d", wa);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:23: error: lvalue required as left operand of assignment
   11 |       if ( n = 0 && x = 0)
      |                       ^
main.c:17:27: error: lvalue required as left operand of assignment
   17 |                if ( i+j+k = x) {
      |                           ^
Language: C

#include <stdio.h>

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

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

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

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

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:23: error: lvalue required as left operand of assignment
   11 |       if ( n = 0 && x = 0)
      |                       ^
main.c:17:27: error: lvalue required as left operand of assignment
   17 |                if ( i+j+k = x) {
      |                           ^
Language: C

#include <stdio.h>

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

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

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

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

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:23: error: lvalue required as left operand of assignment
   11 |       if ( n = 0 && x = 0)
      |                       ^
main.c:17:27: error: lvalue required as left operand of assignment
   17 |                if ( i+j+k = x) {
      |                           ^
Language: C

#include <stdio.h>

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

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

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

      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 = x ) {
                  wa = wa+1;
               }
      }
   }
   printf("%d\n", wa);
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:23: error: lvalue required as left operand of assignment
   11 |       if ( n = 0 && x = 0 )
      |                       ^
main.c:17:27: error: lvalue required as left operand of assignment
   17 |                if ( i+j+k = x ) {
      |                           ^
Language: C

#include <stdio.h>

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

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

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

      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 == x ) {
                  wa = wa+1;
               }
      }
   }
   printf("%d\n", wa);
   return 0;
}

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

#include <stdio.h>

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

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

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

      int wa = 0;

      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 == x ) {
                  wa = wa+1;
               }
      }
   }
   printf("%d\n", wa);
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:19: error: 'wa' undeclared (first use in this function)
   23 |    printf("%d\n", wa);
      |                   ^~
main.c:23: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 wa = 0;
   while ( n > 0 && x > 0 ) {
      scanf("%d %d", &n, &x);

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

      wa = 0;

      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 = x ) {
                  wa = wa+1;
               }
      }
   }
   printf("%d\n", wa);
   return 0;
}

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

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

Compiler output:
main.c: In function 'main':
main.c:5:42: error: expected identifier or '(' before ';' token
    5 |  int kosuu, goukeiti, counter=0, i, j, k,;
      |                                          ^
Language: C

#include<stdio.h>
 
int main()
{
 int kosuu, goukeiti, counter=0, i, j, k,;
  
 scanf("%d %d", &kosuu, &goukeiti);
 
 while((kosuu != 0)&&(goukeiti != 0)){
   for(i = 1; i <= kosuu ; i++){
     for(j = i + 1 ; j <= kosuu  ; j++){
       for(k = j + 1 ; k <= kosuu  ; k++){
         if(i + j + k == goukeiti){
           counter++;
         }
       }
     }
   }


   counter=0;
   scanf("%d %d", &kosuu, &goukeiti);

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

Compiler output:
main.c: In function 'main':
main.c:5:42: error: expected identifier or '(' before ';' token
    5 |  int kosuu, goukeiti, counter=0, i, j, k,;
      |                                          ^
Language: C

#include<stdio.h>
  
int main()
{
 int max, goukei, Count=0, i, j, k;
   
 scanf("%d %d", &max, &goukei);
  
 while((max != 0)&&(goukei != 0)){
   for(i = 1; i <= max ; i++){
     for(j = i + 1 ; j <= max - 1  ; j++){
       for(k = j + 1 ; k <= max - 2  ; k++){
         if(i + j + k == goukei){
           Count++;
         }
       }
     }
   }
   printf("%d \n", Count);
    
   counter=0;
   scanf("%d %d", &max, &goukei);
}
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:4: error: 'counter' undeclared (first use in this function); did you mean 'Count'?
   21 |    counter=0;
      |    ^~~~~~~
      |    Count
main.c:21:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:21:4: error: 'counter' undeclared (first use in this function); did you mean 'Count'?
   21 |    counter=0;
      |    ^~~~~~~
      |    Count
main.c:21:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:22:39: error: expected ';' before 'return'
   22 |  }while((kosuu != 0)&&(goukeiti != 0))
      |                                       ^
      |                                       ;
   23 |  return 0;
      |  ~~~~~~
Language: C

#include <stdio.h>

int main(void) {
   int n, x, i, j, k;
   int a[100][2]; 
   int count;

   while(1){
      for(i = 0; i < 100; i++){
         scanf("%d %d", &n, &x);
         if(n==0 && x==0)
    ????????????????   break;
         else{
            a[i][1] = n;
            a[i][2] = x;
         }
      }
      for(i = 1; i <= a[i][1]; i++){
         count = 0;
         for(j = i + 1; j <= a[i][1]; j++){
            for(k = j + 1; k <= a[i][1]; k++){
               if (i + j + k == a[i][2])
                  count++;
            }
         }
        ????printf("%d\n", count);
      }
   }
}

Compiler output:
main.c: In function 'main':
main.c:12:5: error: expected expression before '?' token
   12 |     ????????????????   break;
      |     ^
main.c:26:9: error: expected expression before '?' token
   26 |         ????printf("%d\n", count);
      |         ^
Language: C

#include <stdio.h>

int main()
{
	int n =101;
	int x=301;
	int count = 0;
	int C[100][2];
	do {
		do
		{
			scanf("%d %d", &n, &x);
			C[count][0] = n;
			C[count][1] = x;
					}
   				count = count + 1;
			} 
   while (n != 0 && x!=0);
	
    for (int l=0; l< count-1 ; l++ )
     {
	printf("Case %d %d\n", C[l][0], C[l][1]);
	n = C[l][0];
	x = C[l][1];
	int kosuu=0;
	for (int i = 1; i < n - 2; i++)
	{
		for (int j = i + 1; j < n - 1; j++)
		{
			
			for (int k = j + 1; k < n ; k++)
			{
				if (i + j + k == x)
				{
				kosuu = kosuu + 1;
				}
			}
		}
	}
	printf("   %d\n", kosuu);
	}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:33: error: expected 'while' before 'count'
   16 |                                 count = count + 1;
      |                                 ^~~~~
Language: C

#include<stdio.h>

int main(void)
{

 int i, j, k;

 int a, b, c;

 while(scanf(%d %d, &a, &b), a > 0){

   c = 0;

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

   for(j = i; j <= a; ++j){

    for(k = j + 1; k <= a; ++k){

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

      }

    }

  }

}

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

 }

 return 0;

}

Compiler output:
main.c: In function 'main':
main.c:10:14: error: expected expression before '%' token
   10 |  while(scanf(%d %d, &a, &b), a > 0){
      |              ^
Language: C

#include <stdio.h>

int main (void) 
{

int n,s,x;

while(1){

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

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


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


print("%d %d %d\n",i,j,k); ++s;

    }
   }
  }
 }

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

if(n == 0 && x == 0){bresk;}
} 
return 0
}

Compiler output:
main.c: In function 'main':
main.c:10:16: error: 'a' undeclared (first use in this function)
   10 | scanf("%d %d",&a,&x);
      |                ^
main.c:10:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:1: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   20 | print("%d %d %d\n",i,j,k); ++s;
      | ^~~~~
      | printf
main.c:29:22: error: 'bresk' undeclared (first use in this function)
   29 | if(n == 0 && x == 0){bresk;}
      |                      ^~~~~
main.c:31:9: error: expected ';' before '}' token
   31 | return 0
      |         ^
      |         ;
   32 | }
      | ~
Language: C

#include <stdio.h>

int main (void) 
{

int n,s,x;

while(1){

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

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 + k == x){


print("%d %d %d\n",i,j,k); ++s;

    }
   }
  }
 }

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

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

Compiler output:
main.c: In function 'main':
main.c:20:1: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   20 | print("%d %d %d\n",i,j,k); ++s;
      | ^~~~~
      | printf
main.c:31:9: error: expected ';' before '}' token
   31 | return 0
      |         ^
      |         ;
   32 | }
      | ~
Language: C

#include <stdio.h>

int main (void) 
{

int n,s,x;

while(1){

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

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 + k == x){


print("%d %d %d\n",i,j,k); ++s;

    }
   }
  }
 }

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

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

Compiler output:
main.c: In function 'main':
main.c:20:1: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   20 | print("%d %d %d\n",i,j,k); ++s;
      | ^~~~~
      | printf
Language: C

#include <stdio.h>

int main (void) 
{

int n=1,s=0,x;

while(1){

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

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


if(i + j + k == x){
   s = s + 1;
}

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

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

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

#include <stdio.h>

int main (void) 
{

int n,s=0,x;

while(1){

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

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


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

Compiler output:
main.c: In function 'main':
main.c:23:22: error: break statement not within loop or switch
   23 | if(n == 0 && x == 0){break;}
      |                      ^~~~~
Language: C

#include<stdio.h>

int main(){

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

while(1){

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

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

break;
count 0;

for(i=1;3*i+3<=x;i++){

for(j=i+1;i+2*j+1<=x;j++){

for(k=n;k>j;k--){

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

count++;
break;

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

break;

}

}

}

}

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

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:16:6: error: expected ';' before numeric constant
   16 | count 0;
      |      ^~
      |      ;
main.c:45:1: error: expected declaration or statement at end of input
   45 | }
      | ^
Language: C

#include<stdio.h>

int main(){

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

while(1){

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

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

break;
count=0;

for(i=1;3*i+3<=x;i++){

for(j=i+1;i+2*j+1<=x;j++){

for(k=n;k>j;k--){

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

count++;
break;

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

break;

}

}

}

}

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

return 0;

}

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

#include <stdio.h>

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

    scanf("%d %d",&n,&x);
    
    for(i = 1;i < n;i++){
        for(j = 1;j < n;j++){
               if(i != j){
                 a = i + j;
               }
            for(k = 1;k < n;k++){
                if(i != k && j != k){
                   sum = i + j + k;
                }  
                if(sum == x){
                   count = count + 1;
                }
            }
        }
    }

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

    return 0;
}
                   

Compiler output:
main.c: In function 'main':
main.c:7:23: error: 'x' undeclared (first use in this function)
    7 |     scanf("%d %d",&n,&x);
      |                       ^
main.c:7:23: 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,n,x,cnt;
	for(;;){
		cnt=0
		scanf("%d %d",&n,&x);
		if(n==0 && x==0)break;
		for(i=1;i<=n;i++){
			for(j=1;j<=n;j++){
				if(i==j)continue;
				for(k=1;k<=n;k++){
					if(i==k || j==k)continue;
					else if(i+j+k==x){
						cnt++;
					}
				}
			}
		}
		cnt=cnt/6;
		printf("%d\n",cnt);
	}
	return 0;
}
	


Compiler output:
main.c: In function 'main':
main.c:5:22: error: expected ';' before 'scanf'
    5 |                 cnt=0
      |                      ^
      |                      ;
    6 |                 scanf("%d %d",&n,&x);
      |                 ~~~~~
Language: C

#include<bits/stdc++.h>
#define mp make_pair
#define F first
#define S second
using namespace std;

typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef long long ll;
typedef vector<int> vi;

int main(){
//	freopen(".in", "r", stdin);
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

	int n, x, comb;

	while(cin >> n >> x){
		if(n == 0 && x == 0) break;
		comb = 0;
		for(int i=1; i<=n; i++){
			int r = x - 2 * i - 1;
			if(i + 1 < r && r <= n)
				comb += (r - i) / 2;
			else{
				r = x - n - i;
				if(i < r && r < n)
					comb += (n - r + 1) / 2;
			}
		}
		cout << comb << '\n';
	}

	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(){
	unsigned short usW_D_set;            	/* 使用できる最大値格納用変数 */
	unsigned long ulW_D_tag;            	/* 目標値格納用変数 */
	signed short ssW_D_mid;            	/* 計算用変数 */
	unsigned short usW_D_agg[100];       	/* 計算結果格納用配列 */
	unsigned short usW_C_i, usW_C_j;           	/* ループ変数 */
	unsigned short usW_C_input_count = 0;	/* 入力数カウンタ */
	unsigned short usW_C_num_count = 0;  	/* 目標を満足する値のカウンタ */
	
	/* 配列の初期化 */
	for(i = 0;i < 100;i++){
		agg[i] = 0;
	}
	
	/* 数値の入力、演算を無限ループ */
	while(1){
		/* 使用できる最大値、目標値の入力 */
		scanf("%d %ld", &usW_D_set, &usW_D_tag);
		
		/* 終了処理 */
		if(usW_D_set == 0 && usW_D_tag == 0){
			break;
		}
		/* カウンタをリセット */
		num_count = 0;
		
		/* 目標を満足する値をカウント */
		for(i = 1;i < usW_D_set;i++){
			for(j = i;j <= usW_D_set;j++){
				/* i + j と目標値の差をssW_D_misに代入 */
				ssW_D_ = usW_D_tag - (i + j);
				/* ssW_D_misがiとjの間にある場合カウント*/
				if(ssW_D_mis > i && ssW_D_mis < j){
					num_count++;
				}
			}
		}
		
		/* カウントした結果を格納 */
		agg[input_count] = num_count;
		/* 入力数をカウント */
		input_count++;
	}
	
	/* 結果の出力 */
	for(i = 0;i < input_count;i++){
		printf("%d\n", agg[i]);
	}
	
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:12:13: error: 'i' undeclared (first use in this function)
   12 |         for(i = 0;i < 100;i++){
      |             ^
main.c:12:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:17: error: 'agg' undeclared (first use in this function)
   13 |                 agg[i] = 0;
      |                 ^~~
main.c:19:46: error: 'usW_D_tag' undeclared (first use in this function); did you mean 'ulW_D_tag'?
   19 |                 scanf("%d %ld", &usW_D_set, &usW_D_tag);
      |                                              ^~~~~~~~~
      |                                              ulW_D_tag
main.c:26:17: error: 'num_count' undeclared (first use in this function)
   26 |                 num_count = 0;
      |                 ^~~~~~~~~
main.c:30:29: error: 'j' undeclared (first use in this function)
   30 |                         for(j = i;j <= usW_D_set;j++){
      |                             ^
main.c:32:33: error: 'ssW_D_' undeclared (first use in this function)
   32 |                                 ssW_D_ = usW_D_tag - (i + j);
      |                                 ^~~~~~
main.c:34:36: error: 'ssW_D_mis' undeclared (first use in this function); did you mean 'ssW_D_mid'?
   34 |                                 if(ssW_D_mis > i && ssW_D_mis < j){
      |                                    ^~~~~~~~~
      |                                    ssW_D_mid
main.c:41:21: error: 'input_count' undeclared (first use in this function); did you mean 'usW_C_input_count'?
   41 |                 agg[input_count] = num_count;
      |                     ^~~~~~~~~~~
      |                     usW_C_input_count
Language: C

#include<stdio.h>
int main(){
	unsigned short usW_D_set;            	/* 使用できる最大値格納用変数 */
	unsigned long ulW_D_tag;            	/* 目標値格納用変数 */
	signed short ssW_D_mid;            	/* 計算用変数 */
	unsigned short usW_D_agg[100];       	/* 計算結果格納用配列 */
	unsigned short usW_C_i, usW_C_j;           	/* ループ変数 */
	unsigned short usW_C_input_count = 0;	/* 入力数カウンタ */
	unsigned short usW_C_num_count = 0;  	/* 目標を満足する値のカウンタ */
	
	/* 配列の初期化 */
	for(usW_C_i = 0;usW_C_i < 100;usW_C_i++){
		usW_D_agg[usW_C_i] = 0;
	}
	
	/* 数値の入力、演算を無限ループ */
	while(1){
		/* 使用できる最大値、目標値の入力 */
		scanf("%d %ld", &usW_D_set, &ulW_D_tag);
		
		/* 終了処理 */
		if(usW_D_set == 0 && ulW_D_tag == 0){
			break;
		}
		/* カウンタをリセット */
		usW_C_num_count = 0;
		
		/* 目標を満足する値をカウント */
		for(usW_C_i = 1;usW_C_i < usW_D_set;usW_C_i++){
			for(usW_C_j = usW_C_i;usW_C_j <= usW_D_set;usW_C_j++){
				/* usW_C_i + usW_C_j と目標値の差をssW_D_misに代入 */
				ssW_D_ = ulW_D_tag - (usW_C_i + usW_C_j);
				/* ssW_D_misがusW_C_iとusW_C_jの間にある場合カウント*/
				if(ssW_D_mis > usW_C_i && ssW_D_mis < usW_C_j){
					usW_C_num_count++;
				}
			}
		}
		
		/* カウントした結果を格納 */
		usW_D_agg[usW_C_input_count] = usW_C_num_count;
		/* 入力数をカウント */
		usW_C_input_count++;
	}
	
	/* 結果の出力 */
	for(usW_C_i = 0;usW_C_i < usW_C_input_count;usW_C_i++){
		printf("%d\n", usW_D_agg[usW_C_i]);
	}
	
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:32:33: error: 'ssW_D_' undeclared (first use in this function)
   32 |                                 ssW_D_ = ulW_D_tag - (usW_C_i + usW_C_j);
      |                                 ^~~~~~
main.c:32:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:34:36: error: 'ssW_D_mis' undeclared (first use in this function); did you mean 'ssW_D_mid'?
   34 |                                 if(ssW_D_mis > usW_C_i && ssW_D_mis < usW_C_j){
      |                                    ^~~~~~~~~
      |                                    ssW_D_mid
Language: C

#include<stdio.h>
int main(){
	unsigned short usW_D_set;            	/* 使用できる最大値格納用変数 */
	unsigned long ulW_D_tag;            	/* 目標値格納用変数 */
	signed short ssW_D_mid;            	/* 計算用変数 */
	unsigned short usW_C_i, usW_C_j;           	/* ループ変数 */
	unsigned short usW_C_num_count = 0;  	/* 目標を満足する値のカウンタ */
	
	/* 配列の初期化 */
	for(usW_C_i = 0;usW_C_i < 100;usW_C_i++){
		usW_D_agg[usW_C_i] = 0;
	}
	
	/* 数値の入力、演算を無限ループ */
	while(1){
		/* 使用できる最大値、目標値の入力 */
		scanf("%d %ld", &usW_D_set, &ulW_D_tag);
		
		/* 終了処理 */
		if(usW_D_set == 0 && ulW_D_tag == 0){
			break;
		}
		/* カウンタをリセット */
		usW_C_num_count = 0;
		
		/* 目標を満足する値をカウント */
		for(usW_C_i = 1;usW_C_i < usW_D_set;usW_C_i++){
			for(usW_C_j = usW_C_i;usW_C_j <= usW_D_set;usW_C_j++){
				/* usW_C_i + usW_C_j と目標値の差をssW_D_midに代入 */
				ssW_D_mid = ulW_D_tag - (usW_C_i + usW_C_j);
				/* ssW_D_misがusW_C_iとusW_C_jの間にある場合カウント*/
				if(ssW_D_mid > usW_C_i && ssW_D_mid < usW_C_j){
					usW_C_num_count++;
				}
			}
		}
		
		/* 結果の出力 */
		printf("%d\n", usW_D_agg[usW_C_i]);
		
	}
	
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:11:17: error: 'usW_D_agg' undeclared (first use in this function); did you mean 'ulW_D_tag'?
   11 |                 usW_D_agg[usW_C_i] = 0;
      |                 ^~~~~~~~~
      |                 ulW_D_tag
main.c:11:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
	unsigned short usW_D_set;            	/* 使用できる最大値格納用変数 */
	unsigned long ulW_D_tag;            	/* 目標値格納用変数 */
	signed short ssW_D_mid;            	/* 計算用変数 */
	unsigned short usW_C_i, usW_C_j;           	/* ループ変数 */
	unsigned short usW_C_num_count = 0;  	/* 目標を満足する値のカウンタ */

	/* 数値の入力、演算を無限ループ */
	while(1){
		/* 使用できる最大値、目標値の入力 */
		scanf("%d %ld", &usW_D_set, &ulW_D_tag);
		
		/* 終了処理 */
		if(usW_D_set == 0 && ulW_D_tag == 0){
			break;
		}
		/* カウンタをリセット */
		usW_C_num_count = 0;
		
		/* 目標を満足する値をカウント */
		for(usW_C_i = 1;usW_C_i < usW_D_set;usW_C_i++){
			for(usW_C_j = usW_C_i;usW_C_j <= usW_D_set;usW_C_j++){
				/* usW_C_i + usW_C_j と目標値の差をssW_D_midに代入 */
				ssW_D_mid = ulW_D_tag - (usW_C_i + usW_C_j);
				/* ssW_D_misがusW_C_iとusW_C_jの間にある場合カウント*/
				if(ssW_D_mid > usW_C_i && ssW_D_mid < usW_C_j){
					usW_C_num_count++;
				}
			}
		}
		
		/* 結果の出力 */
		printf("%d\n", usW_D_agg[usW_C_i]);
		
	}
	
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:34:32: error: 'usW_D_agg' undeclared (first use in this function); did you mean 'ulW_D_tag'?
   34 |                 printf("%d\n", usW_D_agg[usW_C_i]);
      |                                ^~~~~~~~~
      |                                ulW_D_tag
main.c:34:32: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
	unsigned short usW_D_set;            	/* 使用できる最大値格納用変数 */
	unsigned long ulW_D_tag;            	/* 目標値格納用変数 */
	signed short ssW_D_mid;            	/* 計算用変数 */
	unsigned short usW_C_i, usW_C_j;           	/* ループ変数 */
	unsigned short usW_C_num_count = 0;  	/* 目標を満足する値のカウンタ */

	/* 数値の入力、演算を無限ループ */
	while(1){
		/* 使用できる最大値、目標値の入力 */
		scanf("%d %ld", &usW_D_set, &ulW_D_tag);
		
		/* 終了処理 */
		if(usW_D_set == 0 && ulW_D_tag == 0){
			break;
		}
		/* カウンタをリセット */
		usW_C_num_count = 0;
		
		/* 目標を満足する値をカウント */
		for(usW_C_i = 1;usW_C_i < usW_D_set;usW_C_i++){
			for(usW_C_j = usW_C_i;usW_C_j <= usW_D_set;usW_C_j++){
				/* usW_C_i + usW_C_j と目標値の差をssW_D_midに代入 */
				ssW_D_mid = ulW_D_tag - (usW_C_i + usW_C_j);
				/* ssW_D_misがusW_C_iとusW_C_jの間にある場合カウント*/
				if(ssW_D_mid > usW_C_i && ssW_D_mid < usW_C_j){
					usW_C_num_count++;
				}
			}
		}
		
		/* 結果の出力 */
		printf("%d\n", usW_D_num_count[usW_C_i]);
		
	}
	
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:34:32: error: 'usW_D_num_count' undeclared (first use in this function); did you mean 'usW_C_num_count'?
   34 |                 printf("%d\n", usW_D_num_count[usW_C_i]);
      |                                ^~~~~~~~~~~~~~~
      |                                usW_C_num_count
main.c:34:32: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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


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

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


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

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



Compiler output:
main.c:3:10: error: expected declaration specifiers or '...' before numeric constant
    3 | int main(0) {
      |          ^
Language: C

#include <stdio.h>
int main(void){
    // Your code here!
    while True:
    n,x = [int(x) for x in input().split()]
    if (n,x)==(0,0): break
    cnt=0
    for i in range(1,n-1):
        for j in range(i+1,n):
            for k in range(j+1,n+1):
                if i+j+k == x: cnt+=1
    print(cnt)
    return 0;
    
}



Compiler output:
main.c: In function 'main':
main.c:4:11: error: expected '(' before 'True'
    4 |     while True:
      |           ^~~~
      |           (
main.c:5:5: error: 'n' undeclared (first use in this function)
    5 |     n,x = [int(x) for x in input().split()]
      |     ^
main.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:7: error: 'x' undeclared (first use in this function)
    5 |     n,x = [int(x) for x in input().split()]
      |       ^
main.c:5:44: error: expected ';' before 'if'
    5 |     n,x = [int(x) for x in input().split()]
      |                                            ^
      |                                            ;
    6 |     if (n,x)==(0,0): break
      |     ~~
Language: C

#include <stdio.h> 
#define R_N 3 int func(int n, int x)
 {
 int p[R_N + 1], i, j = 0;
 if(n < R_N);
 return 0;
 for(i = 0;
 i <= R_N;
 ++ i) p[i] = i;
 while(!p[0])
{
 int s = 0;
 for(i = 1;
 i <= R_N;
 ++ i) s += p[i];
 if(s == x)
{
 int k;
 printf("%d ", p[1]);
 for(k = 2; k <= R_N;
 ++ k);
 printf("+ %d ", p[k]);
 printf("= %d\n", s);
 ++ j;
 }
 for(++ p[i = R_N];
 i && p[i] == n + i - R_N + 1;
 -- i) ++ p[i - 1];
 for( ;
 i < R_N;
 ++ i) p[i + 1] = p[i] + 1;
 }
 return j;
 }
 int main(void)
 {
 int n, x;
 fputs("n x < ", stdout);
 scanf("%d %d", &n, &x);
 printf("\n%d\n", func(n, x));
 return 0;
} 


Compiler output:
main.c:3:2: error: expected identifier or '(' before '{' token
    3 |  {
      |  ^
main.c: In function 'main':
main.c:40:19: error: implicit declaration of function 'func' [-Wimplicit-function-declaration]
   40 |  printf("\n%d\n", func(n, x));
      |                   ^~~~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |         scanf_s("%d %d", &n, &x);
      |         ^~~~~~~
      |         scanf
Language: C

#include <stdio.h>
int main()
{
	int n, x, i, j, k, g, p = 0;
	scanf_s("%d %d", &n, &x);
	while (n != 0 || x != 0)
	{
		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++;
				}
			}
		}
		printf("%d"\n, p);
		scanf_s("%d %d", &n, &x);
	}
}


Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |         scanf_s("%d %d", &n, &x);
      |         ^~~~~~~
      |         scanf
main.c:24:28: error: stray '\' in program
   24 |                 printf("%d"\n, p);
      |                            ^
main.c:24:28: error: expected ')' before 'n'
   24 |                 printf("%d"\n, p);
      |                       ~    ^~
      |                            )
Language: C

#include<stdio.h>

int main(void){

int i,kosuu,k,j=0;

char moji[100][21];

scanf(“%d”,&kosuu);

for(i=0;i<kosuu;i++) scanf(“%s”,moji[i]);

for(j=k+1;j<kosuu;j++){

　if(strcmp(moji[k],moji[j])>0){

　　k=j;

　　　}

　　}

　printf(“%s\n”,moji[k]);

return 0; }


Compiler output:
main.c: In function 'main':
main.c:9:7: error: stray '\342' in program
    9 | scanf(<U+201C>%d<U+201D>,&kosuu);
      |       ^~~~~~~~
main.c:9:8: error: expected expression before '%' token
    9 | scanf(“%d”,&kosuu);
      |        ^
main.c:9:10: error: stray '\342' in program
    9 | scanf(<U+201C>%d<U+201D>,&kosuu);
      |                 ^~~~~~~~
main.c:11:28: error: stray '\342' in program
   11 | for(i=0;i<kosuu;i++) scanf(<U+201C>%s<U+201D>,moji[i]);
      |                            ^~~~~~~~
main.c:11:29: error: expected expression before '%' token
   11 | for(i=0;i<kosuu;i++) scanf(“%s”,moji[i]);
      |                             ^
main.c:11:31: error: stray '\342' in program
   11 | for(i=0;i<kosuu;i++) scanf(<U+201C>%s<U+201D>,moji[i]);
      |                                      ^~~~~~~~
main.c:15:1: error: stray '\343' in program
   15 | <U+3000>if(strcmp(moji[k],moji[j])>0){
      | ^~~~~~~~
main.c:15:6: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   15 | 　if(strcmp(moji[k],moji[j])>0){
      |      ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:17:1: error: stray '\343' in program
   17 | <U+3000><U+3000>k=j;
      | ^~~~~~~~
main.c:17:3: error: stray '\343' in program
   17 | <U+3000><U+3000>k=j;
      |         ^~~~~~~~
main.c:19:1: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000>}
      | ^~~~~~~~
main.c:19:3: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000>}
      |         ^~~~~~~~
main.c:19:5: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000>}
      |                 ^~~~~~~~
main.c:21:1: error: stray '\343' in program
   21 | <U+3000><U+3000>}
      | ^~~~~~~~
main.c:21:3: error: stray '\343' in program
   21 | <U+3000><U+3000>}
      |         ^~~~~~~~
main.c:23:1: error: stray '\343' in program
   23 | <U+3000>printf(<U+201C>%s\n<U+201D>,moji[k]);
      | ^~~~~~~~
main.c:23:10: error: stray '\342' in program
   23 | <U+3000>printf(<U+201C>%s\n<U+201D>,moji[k]);
      |                ^~~~~~~~
main.c:23:11: error: expected expression before '%' token
   23 | 　printf(“%s\n”,moji[k]);
      |           ^
main.c:23:13: error: stray '\' in program
   23 | 　printf(“%s\n”,moji[k]);
      |             ^
main.c:23:15: error: stray '\342' in program
   23 | <U+3000>printf(<U+201C>%s\n<U+201D>,moji[k]);
      |                            ^~~~~~~~
Language: C

{
 int a,b=1,s,syuu,t,z,c,v=0;
 char mozi[12]="Hello World";
 double v2,v3;
 char zi[12];

 while(1){
 scanf("%d %d", &a, &z);

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

 if(i+j+k == z)
if((i<j) && (j<k)){ 
 printf("%d %d %d\n",i, j, k);++v;
 } }
 }
 printf("組み合わせの数%d\n",v);
 if(a==0&&z==0){break;}
 }
 return 0
}


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

#include<stdio.h>

int main(){

int i,kosuu,k,j=0;

char moji[100][21];

scanf(“%d”,&kosuu);

for(i=0;i<kosuu;i++) scanf(“%s”,moji[i]);

for(j=k+1;j<kosuu;j++){

　if(strcmp(moji[k],moji[j])>0){

　　k=j;

　　　}

　　}

　printf(“%s\n”,moji[k]);

return 0; }


Compiler output:
main.c: In function 'main':
main.c:9:7: error: stray '\342' in program
    9 | scanf(<U+201C>%d<U+201D>,&kosuu);
      |       ^~~~~~~~
main.c:9:8: error: expected expression before '%' token
    9 | scanf(“%d”,&kosuu);
      |        ^
main.c:9:10: error: stray '\342' in program
    9 | scanf(<U+201C>%d<U+201D>,&kosuu);
      |                 ^~~~~~~~
main.c:11:28: error: stray '\342' in program
   11 | for(i=0;i<kosuu;i++) scanf(<U+201C>%s<U+201D>,moji[i]);
      |                            ^~~~~~~~
main.c:11:29: error: expected expression before '%' token
   11 | for(i=0;i<kosuu;i++) scanf(“%s”,moji[i]);
      |                             ^
main.c:11:31: error: stray '\342' in program
   11 | for(i=0;i<kosuu;i++) scanf(<U+201C>%s<U+201D>,moji[i]);
      |                                      ^~~~~~~~
main.c:15:1: error: stray '\343' in program
   15 | <U+3000>if(strcmp(moji[k],moji[j])>0){
      | ^~~~~~~~
main.c:15:6: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   15 | 　if(strcmp(moji[k],moji[j])>0){
      |      ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:17:1: error: stray '\343' in program
   17 | <U+3000><U+3000>k=j;
      | ^~~~~~~~
main.c:17:3: error: stray '\343' in program
   17 | <U+3000><U+3000>k=j;
      |         ^~~~~~~~
main.c:19:1: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000>}
      | ^~~~~~~~
main.c:19:3: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000>}
      |         ^~~~~~~~
main.c:19:5: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000>}
      |                 ^~~~~~~~
main.c:21:1: error: stray '\343' in program
   21 | <U+3000><U+3000>}
      | ^~~~~~~~
main.c:21:3: error: stray '\343' in program
   21 | <U+3000><U+3000>}
      |         ^~~~~~~~
main.c:23:1: error: stray '\343' in program
   23 | <U+3000>printf(<U+201C>%s\n<U+201D>,moji[k]);
      | ^~~~~~~~
main.c:23:10: error: stray '\342' in program
   23 | <U+3000>printf(<U+201C>%s\n<U+201D>,moji[k]);
      |                ^~~~~~~~
main.c:23:11: error: expected expression before '%' token
   23 | 　printf(“%s\n”,moji[k]);
      |           ^
main.c:23:13: error: stray '\' in program
   23 | 　printf(“%s\n”,moji[k]);
      |             ^
main.c:23:15: error: stray '\342' in program
   23 | <U+3000>printf(<U+201C>%s\n<U+201D>,moji[k]);
      |                            ^~~~~~~~
Language: C

#include <stdio.h>int main(void){   // Your code here!   int n,x,i,j,k,c;   c=0;   while(1){       scanf("%d %d",&n,&x);       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(j !=k && i != j&& i != k&& i+j+k==x){                    c=c+1;                   }               }           }       }       printf("%d\n",c/6);   c = 0;   }       return 0;}


Compiler output:
main.c:1:19: warning: extra tokens at end of #include directive
    1 | #include <stdio.h>int main(void){   // Your code here!   int n,x,i,j,k,c;   c=0;   while(1){       scanf("%d %d",&n,&x);       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(j !=k && i != j&& i != k&& i+j+k==x){                    c=c+1;                   }               }           }       }       printf("%d\n",c/6);   c = 0;   }       return 0;}
      |                   ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

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

using namespace std;

typedef struct{
	char name[11];
	int time;
}Process;

class ProcessQueue{
public:
	ProcessQueue(int size):
		m_size(size),
		m_head(0),
		m_tail(0),
		number(0)
	{
		m_process = new Process[m_size];
	};

	~ProcessQueue(){
		delete[] m_process;
	};

	void enQueue(Process process){
		//strcpy(m_process[m_tail].name,process.name);
		//m_process[m_tail].time = process.time;

		m_process[m_tail] = process;	//=??§??£??\????

		number++;

		if(m_tail < m_size-1){
			m_tail++;
		}else{	//?????°?????????
			m_tail = 0;
		}
	};

	Process deQueue(){
		number--;
		if(m_head < m_size-1){
			m_head++;
			return m_process[m_head-1];
		}else{	//?????°?????????
			m_head = 0;
			return m_process[m_size-1];
		}
	};

	int getNumber(){
		return number;
	}

private:
	int m_head;
	int m_tail;
	int m_size;
	int number;
	Process* m_process;

};

int main(){

	int n,q,totaltime=0;
	scanf("%d%d",&n,&q);

	ProcessQueue queue(n);

	Process tmp;
	for(int i = 0; i < n; i++){
		scanf("%s%d",&tmp.name,&tmp.time);
		queue.enQueue(tmp);
	}

	while(queue.getNumber() != 0){
		tmp = queue.deQueue();
		if(tmp.time - q > 0){
			totaltime += q;
			tmp.time -= q;
			queue.enQueue(tmp);
		}else{
			totaltime += tmp.time;
			printf("%s %d\n",tmp.name,totaltime);
		}
	}

}



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

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



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

#include <stdio.h>

	int a, b, c;
	int ans;

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

		ans = 0;
		max = x; if (max > n) max = n;
		for (a = 1; a <= max; a++) {
			for (b = a + 1; b <= max; b++) {
				c = x - a - b;
				if (c > b && c <= n) ans++;
			}
		}
		printf("%d\n", ans);
	}
	return 0;
}



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

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

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:10:15: error: 'xn' undeclared (first use in this function); did you mean 'x'?
   10 |     for(i=1;i<xn-1;i++)
      |               ^~
      |               x
main.c:10:15: note: each undeclared identifier is reported only once for each function it appears in