Go: package main

import (
  "fmt"
)

func main() {
  var a int
  var b int
  for _, err := fmt.Scan(&a); err == nil; _, err = fmt.Scan(&a) {
    b = 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 (i+j+k+l == a) {
              b++
            }
          }
        }
      }
    }
  fmt.Println(b)
  }
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;

int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

int main(){
	ios::sync_with_stdio(false);

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

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

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

C++: //http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0008
#include <iostream>
using namespace std;
int main() {
	cin.tie(0); ios::sync_with_stdio(false);
	int n; cin >> n;
	int ans = 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)ans++;
				}
			}
		}
	}
	cout << ans << endl;
}

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

int main( void ){
    int nCount = 0;
    int n[50];
    int m = 0;
    char str[3];
    while( true ){
        gets( str );
        if(( n[m] = atoi(str)) == 0 ) break;
        m++;
    }
    for( int a = 0;a < m;a++ ){
    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[a] ) nCount++;
                }
            }
       }
    }
    printf( "%d\n",nCount );
    }
    return 0;
}

C++: #include<iostream>

int main(){
	int a,b,c,d,i,n;
	
	while(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;
}

C++: include <stdio.h>

int main(){
    printf("4\n4\n");
}

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

int count(int n){
	int counter = 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){
						counter++;
					}
				}
			}
		}
	}
	return counter;
}

int main(){
	vector<int> results;
	int n;
	while(cin >> n){
		results.push_back(count(n));
	}
	for(auto result : results){
		cout << result << endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int n,ans=0;
	cin >> n;
	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++;
				}
			}
		}
	}
	cout << ans << endl;
}

C++: #include <string>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>
#include <iomanip>


using namespace std;

typedef unsigned long long ull;
int main(void) {
	int n;
	while(cin >> n){
	int res = 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)res++;
	}	
	}	
	}	
	}
	cout << res << endl;
	}
}

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

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

  return 0;
}

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

int main(){
	int total[100];
	int n;
	for(int i=0;i<100;i++){
		total[i]=0;
	}

	for(int i1=0;i1<10;i1++){
		for(int i2=0;i2<10;i2++){
			for(int i3=0;i3<10;i3++){
				for(int i4=0;i4<10;i4++){
					total[i1+i2+i3+i4] += 1;
				}
			}
		}
	}
	while(cin>>n){
		cout<<total[n]<<endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main() {
	int n, a, b, c, d, cnt = 0;
	while (cin >> n) {
		for (a = 0; a < 10 && a < n; a++) {
			for (b = 0; b < 10 && b < n; b++) {
				for (c = 0; c < 10 && c < n; c++) {
					for (d = 0; d < 10 && d < n; d++) {
						if (a + b + c + d == n) {
							cnt++;
							break;
						}
					}
				}
			}
		}
		cout << cnt << endl;
	}
	return 0;
}

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

void soi(int k,int n) {
  if(k != 1) {
    for(int i=0;i<10;i++) {
      soi(k-1,n-i);
    }
  }
  else if((k == 1) &&(n <= 9 && n >= 0)){
    ans++;
      }
}



  int main() {
    int x;
    while(cin >> x) {
      soi(4,x);
      cout << ans << endl;
      ans = 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+j+k+l==n)
                            cnt++;
                    }
         cout << cnt <<endl;
    }
}

C++: #include<iostream>
using namespace std;
int main()
{
	int n;
	int i, j, k, t;
	int cnt=0;
	//cin >> n;
	while (cin >> n)
	{
		cnt = 0;
		for (i = 0; i <= 9; i++)
		{
			for (j = 0; j <= 9; j++)
			{
				for (k = 0; k <= 9; k++)
				{
					for (t = 0; t <= 9; t++)
					{
						if (i + j + k + t == n)
						{
							cnt++;
						}
					}
				}
			}
		}
		cout << cnt << endl;
		//cin >> n;
	}
	return 0;
}

C++: #include <iostream>

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

C++: #include <iostream>

using namespace std;

int main()
{
	while (1){
		int n;
		int res = 0;

		cin >> n;

		if (!n){
			break;
		} // end if
		
		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 ){
							++res;
						} // end if
					} // end for
				} // end for
			} // end for
		} // end for
		cout << res << endl;

	} // end while
	
	return 0;
}