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

include<stdio.h>
#include<math.h>
#include<string.h>
int main(void)
{
  int n;

  for(;scanf("%d",&n)!=EOF;){
    int a,b,c;
    int count=0;
    for(a=0;a<10;a++){
      for(b=0;b<10;b++){
	for(c=0;c<10;c++)
	  if(n-a-b-c>=0 && n-a-b-c<10)
	    count+=1;
      }
    }
    printf("%d\n",count);
  }

  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:8:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |   for(;scanf("%d",&n)!=EOF;){
      |        ^~~~~
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    3 | #include<string.h>
  +++ |+#include <stdio.h>
    4 | int main(void)
main.c:8:8: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |   for(;scanf("%d",&n)!=EOF;){
      |        ^~~~~
main.c:8:8: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:24: error: 'EOF' undeclared (first use in this function)
    8 |   for(;scanf("%d",&n)!=EOF;){
      |                        ^~~
main.c:8:24: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:8:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |     printf("%d\n",count);
      |     ^~~~~~
main.c:18:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
	int a;
	while (cin>>a)
	{
		int ans =0;
		for (int i = 0; i < 10; ++i)
		{
			for (int j = 0; j < 10; ++j)
			{
				for (int  k= 0; k < 10; ++k)
				{
					for (int l = 0; l < 10; ++l)
					{
						if (i+j+k+l == a) ans++;
					}
			}
			}
		}
	}
	cout<<ans;
	return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:23:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |         cout<<ans;
      |               ^~~
      |               abs
Language: C++

#include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
	int a;
	while (cin>>a)
	{
		int ans =0;
		for (int i = 0; i < 10; ++i)
		
			for (int j = 0; j < 10; ++j)
			
				for (int  k= 0; k < 10; ++k)
				
					for (int l = 0; l < 10; ++l)
					
						if (i+j+k+l == a) ans++;
					
			
			
		
	}
	cout<<ans;
	return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:23:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |         cout<<ans;
      |               ^~~
      |               abs
Language: C++

using System;

class aoj
{
	static void Main()
	{
		int[] ans = new int[50];
		for (int i=0; i < 10; i++)
		{
			for (int j=0; j < 10; j++)
			{
				for (int k=0; k < 10; k++)
				{
					for (int l=0; l < 10; l++)
					{
						ans[i + j + k +l] += 1;	
					}
				}
			}
		}

		while (true)
		{
			string input = Console.ReadLine();
			if (input == null) { break; }

			int inputNumber = int.Parse(input);
			Console.WriteLine(ans[inputNumber]);
		}
	}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:31:2: error: expected ';' after class definition
   31 | }
      |  ^
      |  ;
a.cc: In static member function 'static void aoj::Main()':
a.cc:7:20: error: structured binding declaration cannot have type 'int'
    7 |                 int[] ans = new int[50];
      |                    ^~
a.cc:7:20: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:7:20: error: empty structured binding declaration
a.cc:7:23: error: expected initializer before 'ans'
    7 |                 int[] ans = new int[50];
      |                       ^~~
a.cc:16:49: error: 'ans' was not declared in this scope
   16 |                                                 ans[i + j + k +l] += 1;
      |                                                 ^~~
a.cc:24:25: error: 'string' was not declared in this scope
   24 |                         string input = Console.ReadLine();
      |                         ^~~~~~
a.cc:25:29: error: 'input' was not declared in this scope; did you mean 'int'?
   25 |                         if (input == null) { break; }
      |                             ^~~~~
      |                             int
a.cc:25:38: error: 'null' was not declared in this scope
   25 |                         if (input == null) { break; }
      |                                      ^~~~
a.cc:27:43: error: expected primary-expression before 'int'
   27 |                         int inputNumber = int.Parse(input);
      |                                           ^~~
a.cc:28:25: error: 'Console' was not declared in this scope
   28 |                         Console.WriteLine(ans[inputNumber]);
      |                         ^~~~~~~
a.cc:28:43: error: 'ans' was not declared in this scope
   28 |                         Console.WriteLine(ans[inputNumber]);
      |                                           ^~~
Language: C++

#include"iostean.h"
#include<string>
#include<algorithm>
#include<iomanip>
using namespace std;
#define pi 3.141592653589793283462
int main(){
    int c;
	int d=0;
	while (cin>>c)
	{
		for(int i=0;i<=9;i++){
			for(int j=0;j<=9;j++){
				for(int k=0;k<=9;k++){
					for(int l=0;l<=9;l++){
					   if(i+j+k+l==c)
						   d++;
					}
				}
			}
		}
	}
	cout<<d<<endl;
	return 0;
}

Compiler output:
a.cc:1:9: fatal error: iostean.h: No such file or directory
    1 | #include"iostean.h"
      |         ^~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <conio.h>
#include <cstdio>

using namespace std;

int main(void)
{

	int val,count = 0;
	while (scanf_s("%d", &val) != EOF)
	{
		for (int a = 0; a < 10; a++)
		{
			for (int b = 0; b < 10; b++)
			{
				for (int c = 0; c < 10; c++)
				{
					for (int d = 0; d < 10; d++)
					{
						if (a + b + c + d == val)count++;

					}

				}


			}


		}

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

	}

}

Compiler output:
a.cc:2:10: fatal error: conio.h: No such file or directory
    2 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int main(void)
{

	int val,count = 0;
	while (scanf_s("%d", &val) != EOF)
	{
		for (int a = 0; a < 10; a++)
		{
			for (int b = 0; b < 10; b++)
			{
				for (int c = 0; c < 10; c++)
				{
					for (int d = 0; d < 10; d++)
					{
						if (a + b + c + d == val)count++;

					}

				}


			}


		}

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

	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |         while (scanf_s("%d", &val) != EOF)
      |                ^~~~~~~
      |                scanf
Language: C++

import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        while(in.hasNext()){
            int n = in.nextInt(), ans = 0;
            for(int a = 0; a < 10; a++){
                for(int b = 0; b < 10; b++){
                    for(int c = 0; c < 10; c++){
                        for(int d = 0; d < 10; d++){
                            if(a + b + c + d == n) ++ans;
                        }
                    }
                }
            }
            System.out.println(ans);
        }
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:11: error: expected ':' before 'static'
    4 |     public static void main(String[] args){
      |           ^~~~~~~
      |           :
a.cc:4:29: error: 'String' has not been declared
    4 |     public static void main(String[] args){
      |                             ^~~~~~
a.cc:4:38: error: expected ',' or '...' before 'args'
    4 |     public static void main(String[] args){
      |                                      ^~~~
a.cc:20:2: error: expected ';' after class definition
   20 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:9: error: 'Scanner' was not declared in this scope
    5 |         Scanner in = new Scanner(System.in);
      |         ^~~~~~~
a.cc:6:15: error: 'in' was not declared in this scope; did you mean 'int'?
    6 |         while(in.hasNext()){
      |               ^~
      |               int
a.cc:12:54: error: 'ans' was not declared in this scope
   12 |                             if(a + b + c + d == n) ++ans;
      |                                                      ^~~
a.cc:17:13: error: 'System' was not declared in this scope
   17 |             System.out.println(ans);
      |             ^~~~~~
a.cc:17:32: error: 'ans' was not declared in this scope
   17 |             System.out.println(ans);
      |                                ^~~
Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            while (true)
            {
                var str = Console.ReadLine();
                if (string.IsNullOrEmpty(str)) return;
                Console.WriteLine(pattern(int.Parse(str)));
            }
        }

        static int pattern(int n)
        {
            int ret = 0;
            for (int a = 0; a <= 9; a++)
            {
                for (int b = 0; b <= 9; b++)
                {
                    for (int c = 0; c <= 9; c++)
                    {
                        for (int d = 0; d <= 9; d++)
                        {
                            if (a + b + c + d == n)
                                ret++;
                        }
                    }
                }
            }
            return ret;
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:10:26: error: 'string' has not been declared
   10 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:10:35: error: expected ',' or '...' before 'args'
   10 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:39:6: error: expected ';' after class definition
   39 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ConsoleApplication::Program::Main(int*)':
a.cc:14:17: error: 'var' was not declared in this scope
   14 |                 var str = Console.ReadLine();
      |                 ^~~
a.cc:15:21: error: 'string' was not declared in this scope
   15 |                 if (string.IsNullOrEmpty(str)) return;
      |                     ^~~~~~
a.cc:15:42: error: 'str' was not declared in this scope; did you mean 'std'?
   15 |                 if (string.IsNullOrEmpty(str)) return;
      |                                          ^~~
      |                                          std
a.cc:16:17: error: 'Console' was not declared in this scope
   16 |                 Console.WriteLine(pattern(int.Parse(str)));
      |                 ^~~~~~~
a.cc:16:43: error: expected primary-expression before 'int'
   16 |                 Console.WriteLine(pattern(int.Parse(str)));
      |                                           ^~~
Language: C++

#include <iostream>
using namespace	std;

int main ()
{
    int	n;

    while (cin >> n) {
        int res = 0;
    	for (int i = 0; i <= 9; i++) {
            for (int j = 0; j <= 9; j++) {
                for (int k = 0; k <= 9; k++) {
                    for (int l = 0; l <= 9; l++) {
                        if (i + j + k + l = n) res++;
                    }
                }
            }
    	}

        cout << res << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:39: error: lvalue required as left operand of assignment
   14 |                         if (i + j + k + l = n) res++;
      |                             ~~~~~~~~~~^~~
Language: C++

#include <iostream>
#define MAX 10
using namespace std;

int n, res = 0;

void dfs(int sum, int count)
{
    if (sum == n) {
        res++;
      	return ;
    }
    if (num == 4) return;
    for (int i = 0; i <= 9; i++) {
	dfs(sum + i, count + 1);
    }
}

int main(void)
{
    while (cin >> n) {
	res = 0;
        dfs(0, 0);
        cout << res << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'void dfs(int, int)':
a.cc:13:9: error: 'num' was not declared in this scope; did you mean 'sum'?
   13 |     if (num == 4) return;
      |         ^~~
      |         sum
Language: C++

n;

	int count = 0;
	vector<int> result;
	while(cin >> n){

		for(int a = 0; a <= 9; a++)
			for(int b = 0; b <= 9; b++)
				for(int c = 0; c <= 9; c++)
					for(int d = 0; d <= 9; d++)
						if(a+b+c+d == n)
							count++;

		result.push_back(count);
		count = 0;
	}

	for(const int& x : result){
		cout << x << endl;
	}


	return 0;
}

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n;
      | ^
a.cc:4:9: error: 'vector' does not name a type
    4 |         vector<int> result;
      |         ^~~~~~
a.cc:5:9: error: expected unqualified-id before 'while'
    5 |         while(cin >> n){
      |         ^~~~~
a.cc:18:9: error: expected unqualified-id before 'for'
   18 |         for(const int& x : result){
      |         ^~~
a.cc:23:9: error: expected unqualified-id before 'return'
   23 |         return 0;
      |         ^~~~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

#include<iostream>
#include<stdio.h>
int main(){
	int a,b,c,d,n,i;

	std::cin>>n;
	i=0;

	for(a=0;a<=9;a++){
		for(b=0;b<=9;b++){
			for(c=0;c<=9;c++){
				for(d=0;d<=9;d++){
					if(a+b+c+d==n){
						i++;
			

						}
					}
				}
			}
	std::cout<<i<<std::endl;

	return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:10: error: expected '}' at end of input
   24 |         }
      |          ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>

int main(void){

int input=0;
int output=0;

for(int a =0; a<9 ; a++){
	for(int b=0; b<9; b++){
		for(int c=0; c<9;c++){
			for(int d=0; d<9;d++){
			int abcd=a+b+c+d;
				if(abcd==input){
					output++;
				}
			}
		}
	}

	cout << output;
}	

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |         cout << output;
      |         ^~~~
      |         std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:21:8: error: expected '}' at end of input
   21 | }
      |  ^      
a.cc:3:15: note: to match this '{'
    3 | int main(void){
      |               ^
Language: C++

#include <iostream>

using namespace std;
int main(void){

int input=0;
int output=0;

for(int a =0; a<9 ; a++){
	for(int b=0; b<9; b++){
		for(int c=0; c<9;c++){
			for(int d=0; d<9;d++){
			int abcd=a+b+c+d;
				if(abcd==input){
					output++
				}
			}
		}
	}
}

	cout << output;
}	

Compiler output:
a.cc: In function 'int main()':
a.cc:15:49: error: expected ';' before '}' token
   15 |                                         output++
      |                                                 ^
      |                                                 ;
   16 |                                 }
      |                                 ~
Language: C++

V#include<iostream>

int main(){
	int a,b,c,d,i,n;
	
	i=0;
	std::cin>>n;
	for(a=0;a<=9;a++){
		for(b=0;b<=9;b++){
			for(c=0;c<=9;c++){
				for(d=0;d<=9;d++){
					if(a+b+c+d==n){
						i++;
						}
					}
				}
			}
		}
	std::cout<<i<<std::endl;
	
	return 0;
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | V#include<iostream>
      |  ^
a.cc:1:1: error: 'V' does not name a type
    1 | V#include<iostream>
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n;
	while(cin >> n){
	
	int ans = 0;
	for(int i = 0; i <= 9; ++i){
		for(int j = 0; j <= 9; ++j){
			for(int k = 0; k <= 9; ++k){
				for(int l = 0; l <= 9; ++l){
					if(i + j + k + l == n){
						ans++;
					}
				}
			}
		}
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:10: error: expected '}' at end of input
   22 |         }
      |          ^
a.cc:9:24: note: to match this '{'
    9 |         while(cin >> n){
      |                        ^
a.cc:22:10: error: expected '}' at end of input
   22 |         }
      |          ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

??£??£???

Compiler output:
a.cc:1:3: error: extended character £ is not valid in an identifier
    1 | ??£??£???
      |   ^
a.cc:1:6: error: extended character £ is not valid in an identifier
    1 | ??£??£???
      |      ^
a.cc:1:1: error: expected unqualified-id before '?' token
    1 | ??£??£???
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(void) {
  int ans = 0;
  int in;
  int table[51];

  memset(table, 0, sizeof(table));
  for(int a = 0; a < 10; a++) {
    for(int b = 0; b < 10; b++) {
      for(int c = 0; c < 10; c++) {
        for(int d = 0; d < 10; d++) {
          table[a + b + c + d]++;
        }
      }
    }
  }
  while(cin) {
    cin >> in;
    cout << table[in] << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'memset' was not declared in this scope
    9 |   memset(table, 0, sizeof(table));
      |   ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include<iostream>
using namespace std;

int main(void) {
  int in;
  int table[51];

  memset(table, 0, sizeof(table));
  for(int a = 0; a < 10; a++) {
    for(int b = 0; b < 10; b++) {
      for(int c = 0; c < 10; c++) {
        for(int d = 0; d < 10; d++) {
          table[a + b + c + d]++;
        }
      }
    }
  }
  while(cin) {
    cin >> in;
    cout << table[in] << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'memset' was not declared in this scope
    8 |   memset(table, 0, sizeof(table));
      |   ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

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

using namespace std;


// cin >>
// cout <<
int main(){
	int in=0;
	while(scanf("%d",&in)!=EOF){
	int out=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			for(int k=0;k<10;k++){
				for(int l=0;l<10;l++){
					if(i+j+k+l==in){
					out++;	
					}	
				}
			}
		}
	}
	}
	printf("%d\n",count);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:15: error: overloaded function with no contextual type information
   27 |         printf("%d\n",count);
      |         ~~~~~~^~~~~~~~~~~~~~
Language: C++

include <iostream>
using namespace std;

int main(){
	int n,ans;

	while( cin >> n ){
		ans = 0;
		if(n<=36){
			for(int a=0 ; a<=9 ; a++){
				for(int b=0 ; b<=9 ; b++){
					for(int c=0 ; c<=9 ; c++){
						for(int d=0 ; d<=9 ; d++){
							if((a+b+c+d)==n){
								ans++;
							}
						}
					}
				}
			}
		}
		cout << ans << endl;
	}
}  

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:16: error: 'cin' was not declared in this scope
    7 |         while( cin >> n ){
      |                ^~~
a.cc:22:17: error: 'cout' was not declared in this scope
   22 |                 cout << ans << endl;
      |                 ^~~~
a.cc:22:32: error: 'endl' was not declared in this scope
   22 |                 cout << ans << endl;
      |                                ^~~~
Language: C++

include<iostream>
using namespace std;
int main(){
  int n;
  while(cin >>n){
    int solve = 0;
    for(int i=0; i<10; i++)
      for(int j=0; j<10; j++)
    for(int k=0; k<10; k++)
for(int l=0;l<10;l++)
      if(i+j+k+l==n) solve++;
    cout <<solve<<endl;
  }
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |   while(cin >>n){
      |         ^~~
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout <<solve<<endl;
      |     ^~~~
a.cc:12:19: error: 'endl' was not declared in this scope
   12 |     cout <<solve<<endl;
      |                   ^~~~
Language: C++


#include<iostream>
using namespace std;

int main()
{
    int n,x=0;
    while(cin>>n)
    {
        for(int i=0;i<9;i++){
            for(int j=0;j<9;j++){
                for(int k=0;k<9;k++){
                    d=n-i-j-k;
                    if(d>=0&&d<=9)
                        x++;
                }
            }
        }
        cout<<x<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'd' was not declared in this scope
   13 |                     d=n-i-j-k;
      |                     ^
Language: C++

#include <iostream>

using namespace std;

int main(){

	int a, b, c, d;
	int n;

	while(cin >> n){

	for(a=0; a<=9; a++){
		for(b=0; b<=9; b++){
			for(c=0; c<=9; c++){
				for(d=0; d<=9; d++){
					if(a+b+c+d == n){
						count = count +1;
					}
				}
			}
		}
	}

	cout << count <<endl;
}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:49: error: 'count' was not declared in this scope
   17 |                                                 count = count +1;
      |                                                 ^~~~~
a.cc:24:17: error: 'count' was not declared in this scope
   24 |         cout << count <<endl;
      |                 ^~~~~
Language: C++

#include <iostream>

using namespace std;

int main(){

	int a, b, c, d;
	int n;

	while(cin >> n){

	for(a=0; a<=9; a++){
		for(b=0; b<=9; b++){
			for(c=0; c<=9; c++){
				for(d=0; d<=9; d++){
					if(a+b+c+d == n){
						count = count +1;
					}
				}
			}
		}
	}

	cout << count <<endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:49: error: 'count' was not declared in this scope
   17 |                                                 count = count +1;
      |                                                 ^~~~~
a.cc:24:17: error: 'count' was not declared in this scope
   24 |         cout << count <<endl;
      |                 ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n,val;
	while(cin >> n;){
		val = 0;
		for(int i=0;i<=9;i++){
			for(int j=0;j<=9;j++){
				for(int k=0;k<=9;k++){
					for(int l=0;l<=9;l++){
						if(i+j+k+l == n){
							val += 1;
						}
					}
				}
			}
		}
		cout << val << endl;
	}
	return 0;
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: expected ')' before ';' token
    6 |         while(cin >> n;){
      |              ~        ^
      |                       )
a.cc:6:24: error: expected primary-expression before ')' token
    6 |         while(cin >> n;){
      |                        ^
Language: C++

#include <iostream>

using namespace std;

#define rep(i,n) for(int i = 0;i < n;i++)

int main(){
 int n;
 while(cin >> n){
  int ans = 0;
  rep(i,10)rep(j,10)rep(k,10)rep(l,10){
   if(i + j + k + l == n){
    ans++;
   }
  }
 }
 cout << ans << endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |  cout << ans << endl;
      |          ^~~
      |          abs
Language: C++

#include <stdlib.h>

int main()
{
    int n,a,b,c,d,i,j,k,l,cnt=0;
    scanf("%d",&n);
    for (i=0;i<=9;i++){
        for (j=0;j<=9;j++){
            for (k=0;k<=9;k++){
                for (l=0;l<=9;l++){
                    if (i+j+k+l==n)
                        cnt=cnt+1;
                    else
                        continue;
                }
            }
        }
    }
    printf("%d\n",cnt);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'scanf' was not declared in this scope
    6 |     scanf("%d",&n);
      |     ^~~~~
a.cc:19:5: error: 'printf' was not declared in this scope
   19 |     printf("%d\n",cnt);
      |     ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include <stdlib.h>
  +++ |+#include <cstdio>
    2 |
Language: C++

#include <stdlib.h>

int main()
{
    int n,i,j,k,l,cnt=0;
    scanf("%d",&n);
    for (i=0;i<=9;i++){
        for (j=0;j<=9;j++){
            for (k=0;k<=9;k++){
                for (l=0;l<=9;l++){
                    if (i+j+k+l==n)
                        cnt=cnt+1;
                }
            }
        }
    }
    printf("%d\n",cnt);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'scanf' was not declared in this scope
    6 |     scanf("%d",&n);
      |     ^~~~~
a.cc:17:5: error: 'printf' was not declared in this scope
   17 |     printf("%d\n",cnt);
      |     ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include <stdlib.h>
  +++ |+#include <cstdio>
    2 |
Language: C++

include <iostream>

using namespace std;

int main(){
  int s;
  while(cin >> s){
    int c = 0;
    for (int i = 0; i <= 9; i++){
      for (int j = 0; j <= 9; j++){
        for (int k = 0; k <= 9; k++){
          for (int l = 0; l <= 9; l++){
            if ((i+j+k+l) == s){
              c++;
            }
          }
	}
      }
    }
    cout << c;
  }

}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |   while(cin >> s){
      |         ^~~
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout << c;
      |     ^~~~
Language: C++

include <iostream>

using namespace std;

int main(){
  int s;
  while(cin >> s){
    int c = 0;
    for (int i = 0; i <= 9; i++){
      for (int j = 0; j <= 9; j++){
        for (int k = 0; k <= 9; k++){
          for (int l = 0; l <= 9; l++){
            if ((i+j+k+l) == s){
              c++;
            }
          }
	}
      }
    }
    cout << c << endl;
  }

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |   while(cin >> s){
      |         ^~~
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout << c << endl;
      |     ^~~~
a.cc:20:18: error: 'endl' was not declared in this scope
   20 |     cout << c << endl;
      |                  ^~~~
a.cc:21:4: error: expected '}' at end of input
   21 |   }
      |    ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <algorithm>
#include <set>
#include <vector>

using namespace std;

int solve(const int n) {
	set< vector<int> > s;
	vector<int> v(4);
	for (v[0] = 0; v[0] < 10; v[0]++)
		for (v[1] = 0; v[1] < 10; v[1]++)
			for (v[2] = 0; v[2] < 10; v[2]++)
				for (v[3] = 0; v[3] < 10; v[3]++) {
					int sum = 0;
					for (int i = 0; i < 4; i++) sum += v[i];
					if (sum == n) {
						s.insert(v);
						break;
					}
				}
	return s.size();
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	while (cin)) {
		int n;
		cin >> n;
		cout << solve(n) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:20: error: expected primary-expression before ')' token
   29 |         while (cin)) {
      |                    ^
Language: C++

#include <stdio.h>
using namespace std;
#define rep(i,a,n) for(int i=a; i<n; i++)

int main() {
int n;
while(cin >> n) {
int cnt = 0;
rep(a,0,10) rep(b,0,10) rep(c,0,10) rep(d,0,10) {
if(a + b + c + d == n) cnt++;
}
cout << cnt << endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'cin' was not declared in this scope
    7 | while(cin >> n) {
      |       ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:12:1: error: 'cout' was not declared in this scope
   12 | cout << cnt << endl;
      | ^~~~
a.cc:12:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:16: error: 'endl' was not declared in this scope
   12 | cout << cnt << endl;
      |                ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <stdio.h>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

//#define scanf_s scanf
#include <stdio.h>
#include <string>
#include <iostream>
using namespace std;
#define MAX 20
int main(void)
{
	int n,cou = 0;
	int i = 0, j = 0, l = 0, k = 0;
	while (scanf_s("%d", &n) != EOF) {
		for (int i = 0; i <= 9 && i <= n; ++i) {
			for (int j = 0; j <= 9 && i + j <= n; ++j) {
				for (int l = 0; l <= 9 && i + j + l <= n; ++l) {
					for (int k = 0; k <= 9 && i + j + l + k <= n; ++k) {
						if (i + j + l + k == n) ++cou;
					}
				}
			}
		}
		printf("%d\n", cou);
		cou = 0;
	}
}

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

$include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int counter=0;
for(int a=0;a<10;a++){
for(int b=0;b<10;b++){
for(int c=0;c<10;c++){
if(1<=n-a-b-c && n-a-b-c<=9){
counter++;
}
}
}
}
cout<<counter<<endl;
return 0;
}

Compiler output:
a.cc:1:1: error: '$include' does not name a type
    1 | $include<iostream>
      | ^~~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin>>n;
      | ^~~
a.cc:16:1: error: 'cout' was not declared in this scope
   16 | cout<<counter<<endl;
      | ^~~~
a.cc:16:16: error: 'endl' was not declared in this scope
   16 | cout<<counter<<endl;
      |                ^~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;

int main(){
  int n;
  while(cin >> n){
    int a, b, c, d, cnt = 0;
    for(int a = 0, a < 10, a++){
      for(int b = 0, b < 10, b++){
        for(int c = 0, c < 10, c++){
          for(int d = 0, d < 10, d++){
            if(a + b + c + d == n)
             cnt++;
          }
        }
      }
    }
    cout << cnt << endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected ';' before '<' token
   10 |     for(int a = 0, a < 10, a++){
      |                     ^~
      |                     ;
a.cc:10:22: error: expected primary-expression before '<' token
   10 |     for(int a = 0, a < 10, a++){
      |                      ^
a.cc:10:31: error: expected ';' before ')' token
   10 |     for(int a = 0, a < 10, a++){
      |                               ^
      |                               ;
a.cc:11:23: error: expected ';' before '<' token
   11 |       for(int b = 0, b < 10, b++){
      |                       ^~
      |                       ;
a.cc:11:24: error: expected primary-expression before '<' token
   11 |       for(int b = 0, b < 10, b++){
      |                        ^
a.cc:11:33: error: expected ';' before ')' token
   11 |       for(int b = 0, b < 10, b++){
      |                                 ^
      |                                 ;
a.cc:12:25: error: expected ';' before '<' token
   12 |         for(int c = 0, c < 10, c++){
      |                         ^~
      |                         ;
a.cc:12:26: error: expected primary-expression before '<' token
   12 |         for(int c = 0, c < 10, c++){
      |                          ^
a.cc:12:35: error: expected ';' before ')' token
   12 |         for(int c = 0, c < 10, c++){
      |                                   ^
      |                                   ;
a.cc:13:27: error: expected ';' before '<' token
   13 |           for(int d = 0, d < 10, d++){
      |                           ^~
      |                           ;
a.cc:13:28: error: expected primary-expression before '<' token
   13 |           for(int d = 0, d < 10, d++){
      |                            ^
a.cc:13:37: error: expected ';' before ')' token
   13 |           for(int d = 0, d < 10, d++){
      |                                     ^
      |                                     ;
Language: C++

#include<iostream>
using namespace std;
int x,ans;
int main(){
for(){
ans=0;
cin>>x;
if(x=<0)return 0;
for(int i=0;i<10;i++){
for(int j=0;i<10;j++){
for(int k=0;k<10;k++){
if(x-(i+j+k)<10){
ans++;
}
}
}
}
cout<<ans;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: expected primary-expression before ')' token
    5 | for(){
      |     ^
a.cc:20:1: error: expected primary-expression before 'return'
   20 | return 0;
      | ^~~~~~
a.cc:19:2: error: expected ';' before 'return'
   19 | }
      |  ^
      |  ;
   20 | return 0;
      | ~~~~~~
a.cc:20:1: error: expected primary-expression before 'return'
   20 | return 0;
      | ^~~~~~
a.cc:19:2: error: expected ')' before 'return'
   19 | }
      |  ^
      |  )
   20 | return 0;
      | ~~~~~~
a.cc:5:4: note: to match this '('
    5 | for(){
      |    ^
Language: C++

#include<iostream>
using namespace std;
int x,ans;
int main(){
while(1){
ans=0;
cin>>x;
if(x=<0)return 0;
for(int i=0;i<10;i++){
for(int j=0;i<10;j++){
for(int k=0;k<10;k++){
if(x-(i+j+k)<10){
ans++;
}
}
}
}
cout<<ans;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected primary-expression before '<' token
    8 | if(x=<0)return 0;
      |      ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;

int main(){
	int a=0;
	while(cin>>n){
		int a=0;
		for(int i=0;i<=9;i++){
			for(int j=0;j<=9;j++){
				for(int k=0;k<=9;k++){
					for(int l=0;l<=9;l++){
						if(i+j+k+l==n) a+=1;
					}
				}
			}
		}
		cout<<a<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: 'n' was not declared in this scope
    7 |         while(cin>>n){
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int cnt = 0;
    for (int i = 0; i = 10; i++) {
      for (int j = 0; j = 10; j++) {
        for (int k = 0; k = 10; k++) {
          if (0 <= n - i - j - k && n - i - j - k < 10) cnt++;
        }
      }
    }
    cout << cnt << endl;
}

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

#include<iostream>
#include<cstdio>
using namespace std;
int main(){int n;while(cin >> n){int cnt = 0;for(int a = 0;a <= 9;a++){for(int b = 0;b <= 9;b++){for(int c = 0;c <= 9;c++){for(int d = 0;d <= 9;d++){if((a + b + c + d) == n){cnt++;}}}}}cout << cnt <<endl;}
return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected '}' at end of input
    5 | return 0;
      |          ^
a.cc:4:11: note: to match this '{'
    4 | int main(){int n;while(cin >> n){int cnt = 0;for(int a = 0;a <= 9;a++){for(int b = 0;b <= 9;b++){for(int c = 0;c <= 9;c++){for(int d = 0;d <= 9;d++){if((a + b + c + d) == n){cnt++;}}}}}cout << cnt <<endl;}
      |           ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(){
	int n;
	while(cin >> n){
		int cnt = 0;
	for(int a = 0;a <= 9;a++){
		for(int b = 0;b <= 9;b++){
			for(int c = 0;c <= 9;c++){
				for(int d = 0;d <= 9;d++){
					if((a + b + c + d) == n){
						cnt++;
					}
				}
			}
		}
	}
	cout << cnt <<endl;
	}
return 0;

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

#include<iostream>
using namespace std;
int main(){
  int a,b,c,d,n,num;
   
  while(cin >> n){
    count = 0;
    for(a = 0;a <=9;a++){
      for(b = 0;b <=9;b++){
    for(c = 0;c <=9;c++){
      for(d = 0;d <=9;d++){
        if(a+b+c+d == n){num++;}
      }}}}
    cout << count << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'count' was not declared in this scope
    7 |     count = 0;
      |     ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a,b,c,d,n,num;
   
  while(cin >> n){
    count = 0;
    for(a = 0;a <=9;a++){
      for(b = 0;b <=9;b++){
    for(c = 0;c <=9;c++){
      for(d = 0;d <=9;d++){
        if(a+b+c+d == n)num++;
      }
    }
      }
    }
    cout << count << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'count' was not declared in this scope
    7 |     count = 0;
      |     ^~~~~
Language: C++

#include <cstdio>
#include <cstdlib>

int main(){
 int n;
 int ans = 0;
 while(true){
 n = null;
 scanf("%d\n",&n);
 if(n == null) break;
 ans = 0;
 for(int a = 9;a >= 0;a--){
   for(int b = 9;b >= 0;b--){
     for(int c = 9;c >= 0;c--){
       for(int d = 9;d >= 0;d--){
        if(a+b+c+d == n){ans++; break;}
        if(a+b+c+d < n) break;
       }
     }
   }
 }
 printf("%d\n",ans);
 }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: 'null' was not declared in this scope
    8 |  n = null;
      |      ^~~~
Language: C++

#include "stdafx.h"
#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <numeric>
#include <ctype.h>
#include <cstdlib>
#include <string.h>
#include <cmath>
#include <cstdio>





using namespace std;


int main()
{
	int count = 0, num;

	

	while (cin >> num)
	{
		count = 0;

		for (int a = 0; a < 10; a++)
		{
			for (int b = 0; b < 10; b++)
			{
				for (int c = 0; c < 10; c++)
				{
					for (int d = 0; d < 10; d++)
					{
						if (a + b + c + d == num)
							count++;
					}
				}
			}
		}
		cout << count << endl;
	}

	

}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;
int main(){
	int n, i, j, k, l, C = 0;
	while (cin >> n;){
		for (i = 1; i < 10; i++){
			for (j = 1; j < 10; j++){
				for (k = 1; k < 10; k++){
					for (l = 1; l < 10; l++){
						if (n == i + j + k + l){
							C = C++;
						}
					}
				}
			}
		}
	}
	cout << C << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:24: error: expected ')' before ';' token
    5 |         while (cin >> n;){
      |               ~        ^
      |                        )
a.cc:5:25: error: expected primary-expression before ')' token
    5 |         while (cin >> n;){
      |                         ^
Language: C++

int main(){
	
	int e;
	int f=0;
	while(std::cin>>e){
		for(int a=0;a<10;a++){
			for(int b=0;b<10;b++){
				for(int c=0;c<10;c++){
					for(int d=0;d<10;d++){
						if(a+b+c+d==e){
							f++;
						}
		            }
		        }
		    }
		}
		std::cout<<f<<std::endl;
	}
    
    return 0;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:20: error: 'cin' is not a member of 'std'
    5 |         while(std::cin>>e){
      |                    ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main(){
a.cc:17:22: error: 'cout' is not a member of 'std'
   17 |                 std::cout<<f<<std::endl;
      |                      ^~~~
a.cc:17:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:36: error: 'endl' is not a member of 'std'
   17 |                 std::cout<<f<<std::endl;
      |                                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main(){
Language: C++

#include<iostream>
using namespace std;
int main(){
	while(cin >> N){
		int N,count=0;
		for(int a=0;a<=9;a++){
			for(int b=0;b<=9;b++){
				for(int c=0;c<=9;c++){
					for(int d=0;d<=9;d++){
						if(N == (a+b+c+d)){
							count ++;
						}
					}
				}
			}
		}
		cout << count << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:22: error: 'N' was not declared in this scope
    4 |         while(cin >> N){
      |                      ^
Language: C++

#include <iostream>
using namespace std;
 
int solve(){
    int ans = 0;
    for(int i = 0; i <= 9; ++i){
        for(int j = 0; j <= 9; ++j){
            for(int k = 0; k <= 9; ++k){
                for(int l = 0; l <= 9; ++l){
                    int tmp = i + j + k + l;
                    if(tmp == N) ans++;
                }
            }
        }
    }
    return ans;
}
 
int main(){
    int N;
    while(cin >> N){
        int ans = solve();
        cout << ans << endl;
    }
}


Compiler output:
a.cc: In function 'int solve()':
a.cc:11:31: error: 'N' was not declared in this scope
   11 |                     if(tmp == N) ans++;
      |                               ^
Language: C++

#include <cstdio>  
  #include<iostream>
#include<algorithm>
  
int main()  
{  
    int n, cnt, i, j, k, l;  
  
    while(cin >> n) {  
        cnt = 0;  
        for(i=0; i<=9; i++)  
            for(j=0; j<=9; j++)  
                for(k=0; k<=9; k++)  
                    for(l=0; l<=9; l++)  
                        if(i + j + k + l == n)  
                            cnt++;  
  
      cout << cnt << endl;
    }  
  
    return 0;  
}  


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

import java.util.Scanner;
public class Main { 
  public static void main(String[] args){
	  int count=0;
	  int a=0;
	  Scanner sc = new Scanner(System.in);
			//  int n = sc.nextInt();
	  for (int i = 0;i<=9;i++) {
          int n = sc.nextInt();
		  for(int j = 0;j<=9;j++) {
			  for(int k =0;k<=9;k++) {
				  for(int l = 0;l<=9;l++) {
					  a = i + j + k + l;
					  if(a==n) count++;
				  }
			  }
		  }
		  
	  }
	  System.out.println(count);
  
  }
}




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

#include<iostream>
#include<cmath>
using namespace std;

int main()
{
	int n,a,b,cnt=0;
	cin >> n;
	for(a=0;a<=18;a++){
		for(b=0;b<=18;b++){
			if(a+b==i) cnt+= (10-abs(a-9)) * (10-abs(b-9));
		}
	}
	cout << cnt << endl;
	return 0;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:33: error: 'i' was not declared in this scope
   11 |                         if(a+b==i) cnt+= (10-abs(a-9)) * (10-abs(b-9));
      |                                 ^
Language: C++

#include<iostream>
using namespace std;int main(){for(int i,c,k,n,j;cin>>n;k=0){i=0;i<1e4;i++,c=0){for(j=i;j>0;j/=10)c+=j%10;if(c==n)k++;}cout<<k<<endl;}}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:79: error: expected ';' before ')' token
    2 | using namespace std;int main(){for(int i,c,k,n,j;cin>>n;k=0){i=0;i<1e4;i++,c=0){for(j=i;j>0;j/=10)c+=j%10;if(c==n)k++;}cout<<k<<endl;}}
      |                                                                               ^
      |                                                                               ;
Language: C++

#include <iostream>

using namespace std;

bool calc(int a, int b, int n) {
	n -= a-b;
	for (int c=0; c<10; c++) {
		for (int d=0; d<10; d++) {
			if (n == c+d) return true;
		}
	}
	return false;
}

void solve(int n) {
	int count = 0;
	for (int a=0; a<10; a++) {
		for (int b=0; b<10; b++) {
			if (calc(a,b,n)) cout++;
		}
	}
	cout << count << endl;
}

int main() {
	int n;
	while (cin >> n) {
		solve(n);
	}
	return 0;
}

Compiler output:
a.cc: In function 'void solve(int)':
a.cc:19:46: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   19 |                         if (calc(a,b,n)) cout++;
      |                                          ~~~~^~
Language: C++

#include <iostream>

using namespace std;

int calc(int a, int b, int n) {
	int tmp = n-a-b;
	int count = 0;
	for (int c=0; c<10; c++) {
		for (int d=0; d<10; d++) {
			if (tmp == c+d)
				count++;
		}
	}
	return count;
}

void solve(int n) {
	int count = 0;
	for (int a=0; a<10; a++) {
		for (int b=0; b<10; b++) {
			count += calc(a,b,n)
		}
	}
	cout << count << endl;
}

int main() {
	int n;
	while (cin >> n) {
		solve(n);
	}
	return 0;
}

Compiler output:
a.cc: In function 'void solve(int)':
a.cc:21:45: error: expected ';' before '}' token
   21 |                         count += calc(a,b,n)
      |                                             ^
      |                                             ;
   22 |                 }
      |                 ~
Language: C++

#include<cstdio>

int solve(int a,int b){
	if(a==0){
		if(0<=b&&b<=9)return 1;
		else return 0;
	}
	int res=0;
	for(int i=0;i<10;i++){
		res+=solve(a-1,b-i);
	}
	return res;
}

int main(){
	int a;
	while(~scanf("%d",&a);)	printf("%d\n",solve(3,a));
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:30: error: expected ')' before ';' token
   17 |         while(~scanf("%d",&a);) printf("%d\n",solve(3,a));
      |              ~               ^
      |                              )
a.cc:17:31: error: expected primary-expression before ')' token
   17 |         while(~scanf("%d",&a);) printf("%d\n",solve(3,a));
      |                               ^