Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
	}
	for _, value := range resultArr {
		fmt.Println(value)
	}
}

func calcA(input int) int {
	for i := 0; i <= 9; i++ {
		calcB(input, i)
	}
	return count
}

func calcB(input, a int) {
	for i := 0; i <= 9; i++ {
		calcC(input, a, i)
	}
}

func calcC(input, a, b int) {
	for i := 0; i <= 9; i++ {
		calcD(input, a, b, i)
	}
}

func calcD(input, a, b, c int) {
	for i := 0; i <= 9; i++ {
		if a+b+c+i == input {
			count++
		}
	}
}

C++: #include<cstdio>
int num[37],cunt=0;
void S(int n)
{
    int ans=0;
    for(int i=0; i<=9; i++)
    {
        if(i>n)
            break;
        for(int k=0; k<=9; k++)
        {
            if(k>n)
                break;
            for(int j=0; j<=9; j++)
            {
                if(j>n)
                    break;
                for(int m=0; m<=9; m++)
                {
                    if(i+k+j+m==n)
                        ans++;
                    if(m>n)
                        break;
                }
            }
        }
    }
    num[cunt++]=ans;
    return ;
}
int main()
{
    for(int i=0; i<=36; i++)
        S(i);
    int n;
    while(~scanf("%d",&n))
    {
        if(n>=0&&n<=36)
            printf("%d\n",num[n]);
        else
            printf("0\n");
    }
    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;

int main(){
	int n;
	while(cin>>n){
		int a;
		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;
}

C++: #include <cstdio>
using namespace std;

int n;

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

    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++;
          }
        }
      }
    }

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

C++: #include <iostream>

using namespace std;

int main()
{
	int n, cnt;

	while(cin >> n)
	{
		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(n == (a+b+c+d)) cnt++;
		cout << cnt << endl;
	}

	return 0;
}

C++: #include<iostream>
using namespace std;
int find_4combi(int n) {
	int cnt = 0;
	for(int i=0;i<=9999;i++) {
		int a[4];
		int ci = i;
		for(int j=0;j<4;j++) {
			a[j] = ci % 10;
			ci = ci / 10;
		}
		if(a[0]+a[1]+a[2]+a[3] == n)
			cnt++;
	}
	return cnt;
}
int main() {
	int n;
	while(cin >> n) {
		int ncombi = find_4combi(n);		
		cout << ncombi << endl;
	}
}

C++: #include <iostream>
#include <string>
#include <algorithm>

int main(){

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

	while(std::cin >> n){
		x = 0;
		for(i=0;i<10;i++){
		for(j=0;j<10;j++){
		for(k=0;k<10;k++){
		for(l=0;l<10;l++){
			if(n == i + j + k + l){
				x++;
			}
		}
		}
		}
		}
		std::cout << x << std::endl;
	}
}

C++: #include "bits/stdc++.h"
using namespace std;

int main(){
  int x;
  cin>>x;
  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==x)ans++;
        }
      }
    }
  }
  cout<<ans<<endl;
}

C++: #include <iostream>

using namespace std;
int main(){
    int a, b, c, d, i, n[2], jumlah=0;

        cin>>n[i];
        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]){
                                jumlah++;
                            }
                    }
                }
            }
        }

        cout<<jumlah<<endl;

    return 0;
}

C++: #include <iostream>
using namespace std;
#define RENT 100000

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

    cout << cnt << endl;
    cnt = 0;
  }
}

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;

	}

}

C++: #include <iostream>

using namespace std;

int main()
{
        int n;

        while (cin >> n) {
                int ans = 0;
                if (n <= 9) {
                        for (int a = 0; a <= n; a++)
                                for (int b = 0; b <= n; b++)
                                        for (int c = 0; c <= n; c++)
                                                for (int d = 0; d <= n; d++)
                                                        if (a + b + c + d == n)
                                                                ans++;
                }
                else {
                        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;
        }

        return 0;
}

C++: #include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;

int f(int n){
    if(n > 36) return 0;
    int a[4], count = 0;

    for(a[0] = 0;    a[0] <= 9; a[0]++){
    for(a[1] = a[0]; a[1] <= 9; a[1]++){
    for(a[2] = a[1]; a[2] <= 9; a[2]++){
    for(a[3] = a[2]; a[3] <= 9; a[3]++){
        if(a[0] + a[1] + a[2] + a[3] == n){
            do {
                count++;
            }while(next_permutation(a, a+4));
        }
    }}}}
    return count;
}

int main(){
    int n;
    while(cin >> n){
        cout << f(n) << endl;
    }
    return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>

int main(void)
{
	int n;
	char buf[256];
	
	
	while (fgets(buf, 256, stdin) != NULL){
		int ans;

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

C++: #include<iostream>
#include<vector>
#include<cstdio>
#include<algorithm>

using namespace std;

int main(){
  int num,count;
  vector<int> v(4,0) ;
  while(cin >> num){
    count = 0;
    for(int i = 0; i < 10; ++i){
      for(int j = i; j < 10; ++j){
        for(int k = j; k < 10; ++k){
          for(int l = k; l < 10; ++l){
            if(i + j + k + l == num){
              v[0] = i,v[1] =j,v[2] = k;v[3] = l ;
            }
          }
        }
      }
    }
    do{
      ++count ;
    }while(next_permutation(v.begin(),v.end())) ;
    cout << count << endl;
  }
  return 0;
}

C++: #include <cstdlib>
#include <iostream>

int main(){
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);

    int n,m;
    while (std::cin >> n) {
        m = 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){
                            m += 1;
                        }
                    }
                }
            }
        }
        std::cout << m << std::endl;
    }
    return EXIT_SUCCESS;
}