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() {
  int n;
  while (cin >> n) {
    int sum = 0;
    int cnt = 0;
    for (int a = 0; a < 10; ++a) {
    sum += a;
    for (int b = 0; b < 10; ++b) {
    sum += b;
    for (int c = 0; c < 10; ++c) {
    sum += c;
    for (int d = 0; d < 10; ++d) {
    sum += d;
    if (sum == n) cnt++;
    }
    }
    }
    }
    cout << cnt << endl;
  }
  return 0;
}

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

int main()
{
	int N;
	
	int count = 0;
	
	while(cin >> N)
	{
		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++)
					{
						int s = a + b + c + d;
						if(s == N)count++;
						else if(s > N)break;
					}
				}
			}
		}
	}
	cout << count << endl;
	return 0;
}

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

int main(void)
{
  int n;
  
  const int minVal = 0;
  const int maxVal = 9;
  
  while (std::cin >> n) {
    int count = 0;
    for (int a = minVal; a <= maxVal; a++) {
      for (int b = minVal; b <= maxVal; b++) {
        for (int c = minVal; c <= maxVal; c++) {
          for (int d = minVal; d <= maxVal; d++) {
            if (a + b + c + d == n) {
              count++;
            }
          }
        }
      }
    }
    std::cout << count << std::endl;
  }
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
  int n=0;
  int C=0;
  int a,b,c,d;

  while(scanf("%d",&n)!=EOF){
C=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){
					  C++;
				  }
			  }
		  }
	  }
  }
  cout<<C<<endl;
  }
  return 0;
}

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

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

  return 0;
}

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

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

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

int main(){
	int n,a,b,c,d,count;
	while(scanf("%d",&n)==1){
	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 = count + 1;
				}
			}
		}
	}
	printf("%d\n",count);
	}
	return 0;
}

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

int main()
{
	int n, cnt;

	while(cin >> n, n)
	{
		cnt = 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)
						{
							cnt++;
						}
					}
				}
			}
		}

		cout << cnt << endl;
	}
}

C++: #include <iostream>

using namespace std;

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

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

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

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

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

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

C++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include "bits/stdc++.h"
#define REP(i,a,b) for(int i=a;i<b;++i)
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define ALL(a) begin(a),end(a)
#define ifnot(a) if(not (a))
#define dump(x)  cerr << #x << " = " << (x) << endl
using namespace std;

// #define int ll
#ifdef _MSC_VER
const bool test = true;
#else 
const bool test = false;
#endif

int dx[] = { 0,1,0,-1 };
int dy[] = { 1,0,-1,0 };
#define INF (1 << 28)
ull mod = (int)1e9 + 7;
//.....................
const int MAX = (int)1e5 + 5;

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

C++: #include <iostream>
#include <stdlib.h>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <sstream>
#include <complex>
#include <ctime>
#include <cassert>
#include <climits>
#include <functional>
#include <algorithm>
using namespace std;

typedef long long ll;
#define REP(i,s,t) for(int i=(s);i<(t);i++)
typedef pair<int, int> PII;
typedef pair<ll, ll> PLL;
const int INF = (int)1E9;
#define MAXN 600005
#define vv vector<int>
#define FILL(x,v) memset(x,v,sizeof(x))


int main () {
    int ans[50];
    FILL(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++){
                    ans[a+b+c+d]++;
                }
            }
        }
    }
    int fuck;
    while (cin>>fuck) {
        cout << ans[fuck] << endl;
    }
    return 0;
}

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

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

C++: #include <iostream>
using namespace std;
int main() {
	int n, a, b, c, d, cnt = 0;
	while (cin >> n) {
		cnt = 0;
		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 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;
}