Go: package main

import "fmt"

func main() {
	var n int

	for {
		result := 0
		_, err := fmt.Scanf("%d", &n)
		if err != nil {
			return
		}

		if n <= 36 {
			for a := 9; a >= 0; a-- {
				for b := 9; b >= 0; b-- {
					for c := 9; c >= 0; c-- {
						for d := 9; d >= 0; d-- {
							if a+b+c+d == n {
								// fmt.Println(a, b, c, d)
								result++
							}
						}
					}
				}
			}
		}
		fmt.Println(result)
	}
}

C++: #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define F            first
#define S            second
#define pb(x)        push_back(x)
#define mp(a,b)      make_pair(a,b)
#define mt(a,b,c)    make_tuple(a,b,c)
#define sz           size()
#define all(A)       A.begin(), A.end()
#define mem(a, b)    memset(a, b, sizeof(a))   // all elements of A are b=0 or b=-1 else don't work
#define f0(i,b)      for(ll i=0;i<(b);i++)
#define f1(i,b)      for(ll i=1;i<=(b);i++)
#define f2(i,a,b)    for(ll i=(a);i<=(b);i++)
#define f3(i,b,a)    for(ll i=(b);i>=(a);i--)
#define rep(i,a,b,c) for(ll i=(a);i!=(b);i+=(c))

#define mod          10000007
#define PI           acos(-1.0)
#define MAX3(a,b,c)  max(a,max(b,c))

#define whilee(i,t)  while(i!=t)
#define  sl(a)       scanf("%lld",&a)
#define  pl(a)       printf("%lld\n",a)

//x = 1e18 means 10^18
//for(auto it =A.begin(); it!=A.end(); it++)
//sort(A.begin(),A.end()); //sort(A, +n, greater<int>());
//binary_search(A.begin(),A.end(),x);
//reverse(A.begin(), A.end());
//cout << *max_element(A.begin(), A.end());
//cout << *min_element(A.begin(), A.end());
//count(A.begin(), A.end(), X); //counts the occurrences of X
//distance(A.begin(),A.end());  //distance between first to last element
//accumulate(A.begin(), A.end(), 0); //add
//next_permutation(A.begin(), A.end());
//prev_permutation(A.begin(), A.end());
//swap(S[0], T[0]);

//scanf("%lld",&x);
//printf("%lld\n",x);
//printf("%I64d\n", a);
//while (scanf("%lld %lld", &a, &b) == 2)
//printf("Case %lld: %lld\n", t++, a);

//vector <ll> A;
//deque <ll> A;
//queue <ll> A;
//stack <ll> A;
//list <int> A;
//set <ll> A;
//map <ll,ll> A;
//pair <ll,ll> A ;
//tuple <ll, ll, ll> A;
//vector <pair <ll,ll>> A ;
//bitset<32> bset1;
//bool ok = true;
//char ch;
//string S, T, U;
ll i=0, j=0, k=0, a, b, c, d, e, f, g, h, l, m, n, o, p, q, r, s, t=1, u, v, w, x, y, z, maxx=INT_MIN, minn=INT_MAX, ans=0, sum=0, cnt=0;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);//NULL
    cout.tie(nullptr);//NULL

    while(cin>>n)
    {
        cnt=0;
        for(i=0; i<=9; i++)
        {
            for(j=0; j<=9; j++)
            {
                for(k=0; k<=9; k++)
                {
                    for(m=0; m<=9; m++)
                    {
                        if((i+j+k+m)==n)
                        {
                            cnt++;
                        }
                    }
                }
            }
        }
        cout<<cnt<<endl;
    }
    return 0;
}

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

int n;

int main()
{
    while (cin >> n) {
        int count = 0;
        for (int a = 0; a <= 9; ++a) {
            for (int b = 0; b <= 9; ++b) {
                for (int c = 0; c <= 9; ++c) {
                    int d = n - a - b - c;
                    if (0 <= d && d <= 9) ++count;
                }
            }
        }
        cout << count << endl;
    }
    return 0;
}

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

int fourNum(int n);

int main(void){
  int n;
  int ans;

  while(cin >> n){
    ans = fourNum(n);
    cout << ans << "\n";
  }

}

int fourNum(int n){
  int sum;
  int cnt = 0;

  for(int i = 0; i <= 9; i++){
    if(i > n){
      break;
    }

    for(int j = 0; j <= 9; j++){
      if((i+j) > n){
        break;
      }

      for(int k = 0; k <= 9; k++){
        if((i+j+k) > n){
          break;
        }

        for(int l = 0; l<= 9; l++){
          sum = i + j + k + l;
          if(sum > n){
            break;
          }

          if(sum == n){
            cnt++;
            break;
          }
        }
      }
    }
  }
 return cnt;
}

C++: 
#include<iostream>
	int n, count = 0;

	void f(int, int, int, int);
	int main()
	{
		while (std::cin >> 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++)
							f(a, b, c, d);

			std::cout << count << std::endl;
		}
		return 0;
	}

	void f(int a, int b, int c, int d)
	{
		if (a + b + c + d == n)
		{
			count++;
		}
	}

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

int main()
{
    int n = 0;

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

    return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;

int main()
{
    int n,count;
    while(scanf("%d",&n)){
            count=0;
        for(int i=0;i<=9;i++){
            for(int j=0;j<=9;j++){
                for(int k=0;k<=9;k++){
                    int l=n-(i+j+k);
                    if(l>=0 && l<=9)
                        count++;


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

C++: //
//  main.cpp
//  CppTest
//
//  Created by Ryu on 2017/02/08.
//  Copyright ?? 2017??´ Ryu. All rights reserved.
//

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

int main(int argc, const char * argv[]) {
    // insert code here...
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n[50];
    int comb[50];
    int m = 0;
    while (cin >> n[m]) {
        if(n[m] <= 18){
            if (n[m] <= 9) {
                comb[m] = powl(4, n[m]);
            }else{
                comb[m] = powl(4, n[m]);
                for (int i = n[m]; i >= 9; i--) {
                    comb[m] -= powl(3, n[m] - 9) * 4;
                }
            }
        }else if(n[m] <= 36){
            n[m] = 36 - n[m];
            if (n[m] <= 9) {
                comb[m] = powl(4, n[m]);
            }else{
                comb[m] = powl(4, n[m]);
                for (int i = n[m]; i >= 9; i--) {
                    comb[m] -= powl(3, n[m] - 9) * 4;
                }
            }
        }else{
            comb[m] = 0;
        }
        m++;
    }
    
    for (int i = 0; i < m; i++) {
        printf("%d\n", comb[i]);
    }
    printf("\n");
    
    return 0;
}

C++: #include <iostream>
using namespace std;
int main() {
  int n, cnt = 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) {
		  for(int l = 0; l <= 9; ++l) {
			if(i > n || i+j > n || i+j+k > n || i+j+k+l > n) continue;
			if(i+j+k+l == n) cnt++;
		  }
		}
	  }
	}
	cout << cnt << endl;
  }
  return 0;
}

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

int main(void){
	int n;
	while(cin >> n){
		int 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==n) count++;
		cout << count << endl;
	}
	return 0;
}

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

int main(){
    int n;
    while(cin>>n){
        int cnt = 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)
                            cnt++;
                    }
         cout << cnt <<endl;
    }
    
    return 0;
}