Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
	}
	for _, value := range resultArr {
		fmt.Println(value)
	}
}

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>
#include<vector>
using namespace std;

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

C++: #include <iostream>

void calc(int i, int n, int& cnt) {
	if (n==0) {
		cnt++;
		return;
	}
	if (i>=4) {
		return;
	}
	int max = n < 9 ? n : 9;
	for (int j=0; j<=max; j++) {
		calc(i+1, n-j, cnt);
	}
}

int main() {
	int n, cnt;
	while (std::cin >> n) {
		cnt = 0;
		calc(0, n, cnt);
		std::cout << cnt << std::endl;
	}
	return 0;
}

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

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

#define rep(i,n) for(int i=0; i<n; i++)
int main(){
	int n, ans;
	ans=0;
	cin >> n;
	rep(i,10) rep(j,10) rep(k,10) rep(l,10) if(i+j+k+l==n) ans++;
	cout << ans << endl;
    return 0;
}

C++: #include <iostream>

using namespace std;

int main(){

  int n;

  while( cin >> n ){

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

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

int main(){
int a[5][51];
int b;
int c;
int d;
b=1;
while(b<5){
c=0;
while(c<51){
a[b][c]=0;
c=c+1;}
b=b+1;}

b=0;
while(b<10){
a[1][b]=1;
b=b+1;}

b=2;
while(b<5){
c=0;
while(c<51){
d=0;
while(d<9){
if(c>=d){a[b][c]=a[b][c]+a[b-1][c-d];}
d=d+1;}
c=c+1;}
b=b+1;}
int n;
while(cin >> n){
cout << a[4][n] << endl;}


}

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


int main()
{
	int i, S, n;
	while (cin >> n) {
		i = 0;
		for (S = 1;S <= 9999;S++) {
			if (S/1000+(S-S/1000*1000)/100+(S-S/100*100)/10+S-S/10*10==n)  
				i++;
		}
		cout << i << endl;
	}
    return 0;
}

C++: #include<cstdio>
int main(){for(int i,c,k,n,j;scanf("%d",&n);k=0){for(i=0;i<1e4;c=0){for(j=i++;j>0;j/=10)c+=j%10;c-n?k:k++;}printf("%d\n",k);}}

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

int main()
{
  int n=0;
  while(cin >> n){
    int res=0;
    if(n>36)
      res = 0;
    else if(n==36)
      res = 1;
    else{
      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++;
	    }
	  }
	}
      }
    }
    cout << res << endl;
  }

  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main()
{
	int n;
	while(cin >> n)
	{
		int cnt = 0;
		
		for(int i0 = 0; i0 < 10; ++i0)
			for(int i1 = 0; i1 < 10; ++i1) 
				for(int i2 = 0; i2 < 10; ++i2) 
					for(int i3 = 0; i3 < 10; ++i3) 
						if(n == i0 + i1 + i2 + i3) cnt++;
		cout << cnt << endl;
	} 
}

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

int main(){
	int n;

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

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

int main()
{
  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++){
	  if( 0<=n-(a+b+c) && n-(a+b+c)<10 ){
	    count++;
	  }
	}
      }
    }
    cout << count << endl;
  }
  return 0;
}

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

int main () {

int n, count = 0;

    cout << "Input n: ";
    cin >> n;

for (int a = 0; a < 10 && a <= n; a++){
    for (int b = 0; b < 10 && b <= n-a; b++){
        for (int c = 0; c < 10 && c <= n-a-b; c++){
            if (n-a-b-c >=0 && n-a-b-c < 10) {
                count++;
            }
        }
    }
}


    cout << count;


    return 0;

}

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

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

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

//using namespace std;


int main(){
    int n=0;

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

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

template <class T> int streamvar(std::istream& in, T& var)
{
    if (!in) {
        cerr << "invalid istream" << endl;
        return 1;
    }
    in >> var;
    if (in.fail()) {
        cerr << "no var" << endl;
        return 1;
    }
    return 0;
}
template <class T> int streamvec(std::istream& in, std::vector<T> &v)
{
    v.clear();
    string s;

    if (!in) {
        cerr << "invalid istream" << endl;
        return 1;
    }
    getline(in, s);
    if (in.fail()) {
        cerr << "no line" << endl;
        return 1;
    }
    istringstream is(s);
    while (1) {
        T tmp;
        is >> tmp;
        if (is.fail())
            break;
        v.push_back(tmp);
    }
    return 0;
}

int main(void)
{
    int n;
    while (!streamvar(cin, n)) {
        int counter = 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)
                        counter++;
        cout << counter << endl;
    }
    return 0;
}

C++: #include <stdio.h>

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

    return 0;
}