Go: package main

import "fmt"

var count int

func main() {
	var inputNum int
	for {
		fmt.Scanf("%d", &inputNum)
		fmt.Printf("%d\n", calcA(inputNum))
		count = 0
	}
}

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 <iostream>
using namespace std;
int main(){
	short int n , a , b , c , d ;
	while( cin >> n ){
		int num =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 )
							num ++ ;
						cout << num << endl;
	}
}

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

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

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

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> veci;
typedef vector<ll> vecll;
typedef vector<string> vecs;
template<class T,class U> using Hash=unordered_map<T,U>;

#define REP(i, a, n) for(ll i = a; i < (ll)n; i++)
#define RREP(i, a, n) for(ll i = n-1; i >= (ll)a; i--)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) RREP(i, 0, n)
#define MD 1000000007

template<class T> T read(){T a;cin >> a;return a;}
template<class T> void read(T& a){cin >> a;}
template<class T, class ...Args> void read(T& a, Args&... args){cin >> a; read(args...);} 
template<class T> void rarr(T a, int n){for(int i = 0; i < n; i++) {cin >> a[i];}}
template<char c = ' ',class T> void write(T a){cout << fixed << setprecision(4) << a << endl;}
template<char c = ' ',class T,class ...Args> void write(T a, Args... args){cout << fixed << setprecision(4) << a << c; write<c>(args...);}
template<class T> void warr(vector<T> a, const char* c = " "){cout << a[0];for(int i = 1; i < (int)a.size(); i++)cout << c << a[i];cout << endl;;}
template<class T> void warr(T a, int n, const char* c = " "){cout << a[0];for(int i = 1; i < n; i++)cout << c << a[i];cout << endl;}
void split(string s, string delim, veci& result){result.clear();string::size_type pos = 0;while(pos != string::npos){string::size_type p = s.find(delim, pos);if(p == string::npos){result.push_back(atoi(s.substr(pos).data()));break;}else {result.push_back(atoi(s.substr(pos, p - pos).data()));}pos = p + delim.size();}}
void split(string s, string delim, vecs& result){result.clear();string::size_type pos = 0;while(pos != string::npos){string::size_type p = s.find(delim, pos);if(p == string::npos){result.push_back(s.substr(pos));break;}else {result.push_back(s.substr(pos, p - pos));}pos = p + delim.size();}}
ull gcd(ull a, ull b){while(true){ull k = a % b;if(k == 0)return b;a = b;b = k;}}
ull comb(ull n, ull m){ull p=1;m=min(m,n-m);for(ull i=1;i<=m;i++){p*=n-i+1;p/=i;}return p;}

int main(void)
{
    int dp[5][100]={0};
    dp[0][0]=1;
    rep(i,4){
        rep(j,10){
            rrep(k,55){
                dp[i+1][k+j]+=dp[i][k];
            }
        }
    }
    while(!cin.eof()){
        int n;
        cin>>n;
        if(n==0)break;
        write(dp[4][n]);
    }
    return 0;
}

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

int main() {
    int n;

    while(cin >> n) {
        int count = 0;
        for (int i = 0; i <= 9; ++i) {
            if ((n - i) / 3.0 > 9) continue;
            if ((n - i) < 0) continue;
            for (int j = 0; j <= 9; ++j) {
                if ((n - (i+j)) / 2.0 > 9) continue;
                if ((n - (i+j)) < 0) continue;
                for (int k = 0; k <= 9; ++k) {
                    if ((n - (i+j+k)) > 9) continue;
                    if ((n - (i+j+k)) < 0) continue;
                    count++;
                }
            }
        }
        cout << count << endl;
    }

    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int a;
	while(cin>>a){
		int b=0;
		for(int a1=0;a1<10;a1++){
			for(int a2=0;a2<10;a2++){
				for(int a3=0;a3<10;a3++){
					for(int a4=0;a4<10;a4++){
						if(a1+a2+a3+a4==a){
							b++;
						}
					}
				}
			}
		}
		cout<<b<<endl;
	}
	return 0;
}

C++: #include <stdio.h>

int main()
{
	int n,dp[51][4];

	for(int i = 0; i < 51; i++){
		if(i < 10)
			dp[i][0] = 1;
		else
			dp[i][0] = 0;
		dp[i][1] = 0;
		dp[i][2] = 0;
		dp[i][3] = 0;
	}
	for(int i = 0; i < 3; i++){
		for(int j = 0; j <= 50; j++){
			for(int c = 0; c < 10; c++){
				if(j+c <= 50)
					dp[j+c][i+1] += dp[j][i];
			}
		}
	}

	while(scanf("%d",&n) != EOF){
		printf("%d\n",dp[n][3]);
	}

	return 0;
}

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

void f(int, int, int, int);
int main()
{
	while(std::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++)
					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 <stdio.h>

int main(void) {
	int a, b, c, d, n, ans;
	while(scanf("%d", &n) != EOF) {
		ans = 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) ans++;
		printf("%d\n", ans);
	}
}

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

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

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
    int n,i,j,k,l,a,b;
    while(cin>>n){
    //a=(n/4)+2;


    int s=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==n)s++;
                }
            }
        }
    }
    cout<<s<<endl;
    }



    return 0;
}

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

using namespace std;

int main()
{
	int input;
	while(cin >> input)
	{
		int count = 0;
		int i, j, k, l;
		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 == input)	count++;
					}
				}
			}
		}
		cout << count << endl;
	}
	
	return 0;
}

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

int main(void) {
  int sum;
  while (scanf("%d", &sum)+1) {
    if (sum > 36) return 0;

    int count = 0;
    int a = 0;
    int b = 0;
    int c = 0;
    int d = 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) == sum) count++;
          }
        }
      }
    }
    printf("%d\n", count);
  }
}

C++: #include <iostream>
#include <string>
#include <cstdio>
#include <cmath>

using namespace std;

int main (void) {
	int n, MAX = 9, c;
	
	while (scanf("%d", &n) != EOF) {
		c = 0;
		
		for (int a = 0; a <= MAX; a ++) {
			for (int b = 0; b <= MAX; b ++) {
				for (int c = 0; c <= MAX; c ++) {
					for (int d = 0; d <= MAX; d ++) {
						if (a + b + c + d == n) {
							c ++;
						}
					}
				}
			}
		}
		
		cout << c << endl;
	}
	
	return 0;
}