Go: package main

import (
	"fmt"
)

func main() {
	for {
		var a int
		fmt.Scan(&a)
		if a == 0 {
			break
		}
		rs := 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 {
							rs++
						}
					}
				}
			}
		}
		fmt.Println(rs)
	}
}

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

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

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<string.h>
#include<vector>
#include<math.h>
#include<queue>
#include <algorithm>
#include<functional>
#include<cstdlib>
#include<cmath>


#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 CI cin >>
#define CO cout <<
#define E << endl;

using namespace std;

typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;

int N;

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


void input(void) {
	
	return;
}


int main(void) {


	int answer = 0;
	
	while (CI 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) {
							answer++;
						}
					}
				}
			}
		}

		CO answer E
		answer = 0;
	}
	
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int a;
int b;
int c;
int main(){

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

	return 0;
}

C++: #include<cstdio>


int
 n,ans;

int
 main()
 {
	
while
 (~scanf("%d"
,&n))
	
{
		
for
 (int
 f1 = 0; f1 < 10; f1++)
		
{
			
for
 (int
 f2 = 0; f2 < 10; f2++)
			
{
				
for
 (int
 f3 = 0; f3 < 10; f3++)
				
{
					
for
 (int
 f4 = 0; f4 < 10; f4++)
					
{
						
if
 (n == (f1 + f2 + f3 + f4))
							
ans++;
					
}
				
}
			
}
		
}
		
printf("%d\n"
,ans);
		
ans = 0;
	
}
 }

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    while(1){
    int n=0,cnt=0;
    if(scanf("%d",&n)==EOF)break;
    for(int i=0;i<10;i++){
        for(int r=0;r<10;r++){
            for(int l=0;l<10;l++){
                for(int k=0;k<10;k++){
                    if(n==i+r+l+k)cnt++;
                }
            }
        }
    }
    cout << cnt <<endl;
    }

    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using lint = long long int;
using ulint = unsigned long long int;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
template<class T, class U> void assign(V<T>& v, int n, const U& a) { v.assign(n, a); }
template<class T, class... Args> void assign(V<T>& v, int n, const Args&... args) { v.resize(n); for (auto&& e : v) assign(e, args...); }


int main() {
  cin.tie(nullptr); ios_base::sync_with_stdio(false);
  string s;
  while (getline(cin, s)) {
    int n = stoi(s);
    int res = 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) ++res;
    }
    cout << res << '\n';
  }
}

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

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

int x;

int mySet(int d,int e){
	int a=0;
	if(d==4){
		if(e==x){
			return 1;
		}else{
			return 0;
		}
}
	for(int i=0;i<=9;i++){
		a+=mySet(d+1,e+i);
	}
	return a;
}

int main(void){
	while(scanf("%d",&x)!=EOF){
		cout<<mySet(0,0)<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
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;
	}
}

C++: #include <iostream>
using namespace std;
void sumOf()
{
	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;

	}

}
int main()
{
	sumOf();
	return 0;
}

C++: #include <cstdio>
int main() {
	int n;
	while(scanf("%d",&n)!=EOF) {
		int ans=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++) {
			ans+=(n==(i+j+k+l));
		}
		printf("%d\n",ans);
	}
}

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

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
const ll inf = (1 << 30) - 1;
const ll infll = (1LL << 61) - 1;

int n;

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

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>

using namespace std;

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

	return 0;
}

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

using namespace std;

int MAX = 9;

vector <int> v;

int main() {
	int n;
	
	while (cin>>n) {
		v.clear();
		
		for (int i=0; i<=MAX; i++) v.push_back(n-i);
		sort(v.begin(), v.end());
		
		int ans = 0;
		
		for (int i=0; i<=MAX; i++) {
			for (int j=0; j<=MAX; j++) {
				for (int k=0; k<=MAX; k++) {
					if (binary_search(v.begin(), v.end(), i+j+k)) ans++;
				}
			}
		}
		cout << ans << endl;
	}
	
	return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int n;
    while(scanf("%d",&n)!=EOF)
    {
        int 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;
    }
    return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int num;
	cin >> num;

	while(cin>>num){
		int answer = 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==num)
							answer++;
				}
			}
		}
	}

	return 0;	
}