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 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 + c + d == n) ++ans;
		}}}}
		cout << ans << endl;
	}
	return 0;
}

C++: #include <iostream>

int main() {
	int m, n, a, b, c, d;

	while (std::cin >> n) {
		m = 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 == n) {
							++m;
						}
					}
				}
			}
		}
		std::cout << m << std::endl;
	}
	return 0;
}

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

int sum( int num ){

  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 == num ){
	    count++;
	  }
	}
      }
    }
  }

  return count;

}

int main(){

  int num;

  while( cin >> num ){
    cout << sum(num) << endl;
  } 

  return 0;
}

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

int main(void){

	while (true){
		int n, count=0;
		cin>>n;
		if (cin.eof()) break;	
		for (int i1=0; i1<10; i1++){
			int n1 = n-i1;
			if (n1 < 0 || n1 > 27) continue;
			for (int i2=0; i2<10; i2++){
				int n2 = n1 - i2;
				if (n2 < 0 || n2 > 18) continue;
				for (int i3=0; i3<10; i3++){
					int n3 = n2 - i3;
					if (n3<0 || n3>9) continue;
					count++;
				}
			}
		}
		cout<<count<<endl;
	}
	return 0;
}

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

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

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

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

C++: #include<iostream>

using namespace std;

int main(void){
  int a,b,c,d;
  int n;
  while(cin >> n){
    int 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 <stdio.h>

int main()
{
	int n;
	int i,j,k,l;
	int ans[51];
	for(i = 0; i < 51; i++){
		ans[i] = 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++){
					ans[i + j + k + l]++;
				}
			}
		}
	}
	scanf("%d",&n);
	if(n < 0){
		printf("0\n");
	}
	printf("%d\n",ans[n]);
	return 0;
}

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

int main()
{
   int n;
   vector<int> r;
   while (scanf("%d",&n) != EOF)
   {
      int count=0;
      for (int a=0; (a<=n && a<10); a++)
      {
	 for (int b=0; (b<=n-a && b<10); b++)
	 {
	    for (int c=0; (c<=n-a-b && c<10); c++)
	    {
	       if (n-a-b-c<10)count++;
	    }
	 }
      }
      r.push_back(count);
   }
   for (int i=0; i<r.size(); i++)
   {
      cout << r[i] << endl;
   }
   return 0;
}

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

int main(void) {
  int sum;
  while (scanf("%d", &sum)+1) {
    if (sum > 36) {
      printf("0\n");
      continue;
    }

    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 <cstdio>
using namespace std;

int main(int argc, const char * argv[])
{
    int n;
    while (cin >> n) {
        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 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;
#define FORMIN(N) ((N > 0) ? N : 0)
#define FORMAX(N) ((N > 9) ? 9 : N)

int main(void)
{
	int n, cnt;
	while(cnt = 0, cin >> n) {
		if(n > 36) {
			cout << 0 << endl;
			continue;
		}
	
		for(int a = FORMIN(n - 27); a <= FORMAX(n); a++) {
			for(int b = FORMIN((n - a) - 18); b <= FORMAX(n - a); b++) {
				for(int c = FORMIN((n - a - b) - 9); c <= FORMAX(n - a - b); c++) {
					cnt++;
				}
			}
		}

		cout << cnt << endl;
	}
	return 0;
}

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

using ll = long long;
#define debug(x) cerr << #x << ": " << x << endl;
#define line() cerr << "---------------" << endl;

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

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

int main() {
	vector<int> count;
	int n;
	while (cin >> n) {
		int r = 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) r++;
					}
				}
			}
		}
		count.push_back(r);
	}
	for (int i = 0; i < count.size(); i++) {
		cout << count[i] << endl;
	}
}

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