Go: package main

import (
        "fmt"
)

func main() {
        var n int
        for {
                _, err := fmt.Scanf("%d", &n)
                if err != nil {
                        break
                }
                cnt := 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 {
                                                        cnt++
                                                }
                                        }
                                }
                        }
                }
                fmt.Printf("%d\n", cnt)
        }
}

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

int main(){
	int n[36]={};
	int m;
	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++){
					n[a+b+c+d]+=1;
				}
			}
		}
	}

	while(cin>>m){
		cout << n[m] << endl;
	}

	return 0;
}

C++: #include <iostream>

using namespace std;
int main(void){
    // Here your code !

int n;

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

}

C++: #include <iostream>

using namespace std;

int main() {
	int n, count;
	while (cin >> n) {
		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++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <algorithm>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
using namespace std;
int main(){
	int n;
	int dp[5][51] = {};
	for (int i = 0;i < 10;++i) dp[1][i] = 1;
	for (int i = 2;i < 5;++i) {
		for (int q = 0;q <= 9;++q) {
			for (int p = 0;p <= 9 * i;++p) {
				dp[i][p + q] += dp[i - 1][p];
			}
		}
	}
	while (cin >> n) {
		printf("%d\n", dp[4][n]);
	}
}

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() {
      int a,b,c,d,count;
      count = 0;
      int num[100];
      int max;
      int n;
      
      for (int v=0;v<100;v++) {
      	num[v] = 100;
      	cin >> num[v];
      	if (!(0<=num[v]&&num[v]<=50)){
      		max = v-1;
      		break;
      	}
      }
      for (int w=0;w<=max;w++){
      	n=num[w];
      	count = 0;
      	for (int i=0;i<=9;i++) {
            a=i;
            if (n-a<0) {

            	break;
            }
            for (int j=0;j<=n-a&&j<=9;j++) {
            	b=j;
            	if (n-a-b < 0) {
            		break;
            	}
            	for (int k=0;k<=n-a-b&&k<=9;k++) {
            		c=k;
            		if (n-a-b-c < 0) {
            			break;
            		}
            		
            		for (int l=0;l<=n-a-b-c&&l<=9;l++) {
            			d=l;
            			if (n==a+b+c+d) {
            				//cout << a << b << c << d <<(a+b+c+d)<<endl;
            				count++;
            			}
            			if (n-a-b-c-d < 0) {
            			break;
            		}
            		}
            	}
            }
      }
      
      cout << count <<endl<<endl;
      }
      return 0;
}

C++: #include <stdio.h>

int main(void) {
	int a,b,c,d,n,i;
	while(scanf("%d",&n) != EOF){
	i = 0;
	for(a = 0; 10 > a; a++){
		for(b = 0; 10 > b; b++){
	for(c = 0; 10 > c; c++){
	for(d = 0; 10 > d; d++){
		if(a+b+c+d == n)i++;
	}	
	}	
	}
	}
	printf("%d\n",i);
	}
	
	return 0;
}

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

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

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int n=1,a,b,c,d;
	int k,l,m,ans=0;
	cin>>n;
	for(a=0;a<=min(n,10);a++){
		k = n-a;
		for(b=0;b<=min(10,k);b++){
			l = k-b;
			for(c=0;c<=min(10,l);c++){
				m = l-c;
				if(0 <= m && m<10){
					ans++;
				}
			}
		}		
	}
	cout << ans << endl;
}

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


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

C++: #include <iostream>

using namespace std;

int main(){

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

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

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

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

C++: //0008 Sum of 4 Integers
//nツつェツ与ツつヲツづァツづェツつスツづつォツ、a+b+c+d=nツづづ按づゥツ組ツづ個古つ青板づーツ出ツ療債つケツづヲ
//ツづ按つィツ、n<=50ツ、0<=a,b,c,d<=9ツづつキツづゥ
//ツ禿シツ療債づ個終ツづュツづィツづ孔OFツづ与ツつヲツづァツづェツづゥ

#include<iostream>
#include<numeric>
using namespace std;

int main(void)
{
	const int N = 4;
	int a[N];
	int n;
	while( cin >> n)
	{
		int count = 0;
		for(int i = 0; i < 10*10*10*10; i++)
		{
			a[0] = i/10/10/10;
			a[1] = i/10/10%10;
			a[2] = i/10%10;
			a[3] = i%10;
			if(accumulate(a, a+N, 0) == n)
				count++;
		}
		cout << count << endl;
	}
}