Go: package main
import (
	"fmt"
	"os"
	"strconv"
	"bufio"
)

var sc = bufio.NewScanner(os.Stdin)

func main(){
	for sc.Scan(){
		n := nextInt()
		cnt := 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{
							cnt++
						}
					}
				}
			}
		}
		fmt.Println(cnt)
	}
}

func next()string{
	//sc.Scan()
	return sc.Text()
}

func nextInt()int{
	a, _ := strconv.Atoi(next())
	return a
}

C++: #include <iostream>
#include <stdio.h>
int main(){

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

	std::cin>>n;
	i=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){
						i++;
						
						
						}
					}
				}
			}
		}

		std::cout<<i<<std::endl;

	
		return 0;
		}

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

int main(){
  int n;

  while(cin >> n){
    int ans = 0;
    for(int h=0; h<=9; h++){
      for(int i=0; i<=9; i++){
        for(int j=0; j<=9; j++){
          for(int k=0; k<=9; k++){
            if(h + i + j + k == n) ans++;
          }
        }
      }
    }
    cout << ans << endl;
  }
}

C++: //-------------
//include
//-------------
#include <map>
#include <list>
#include <cmath>
#include <vector>
#include <string>
#include <cctype>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
//-------------
//typedef
//-------------
typedef  long long LL;
typedef  vector<int> VI;
typedef  vector<double> VD;
typedef  string STR;
typedef  pair<int, int> PII;
typedef  vector<int, int> VII;
typedef  map<string, int> MSI;
//-------------
//utillty
//-------------
#define ALL(a)  (a).begin(),(a).end()
#define MK make_pair
#define PB push_back
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define COUT(a) cout<<a<<endl
#define POW2(a) pow(a, 2.0)
//-------------
//repetition
//-------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
//-------------
//debug
//-------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumpl(c) REP(i,SZ(c))cerr<<#c<<i<<"="<<(c[i])<<endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const int MOD = 1000000007;
int main()
{

	int n;
	while (cin >> n)
	{
	int count=0;
	REP(a, 10)
	{
		REP(b, 10)
		{
			REP(c, 10)
			{
				REP(d, 10)
				{
					if ((a + b + c + d) == n)count++;
				}
			}
		}
	}
	COUT(count);
	}
#ifdef _DEBUG
	while(1);
#endif // _DEBUG

	return 0;
}

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

int main(void){
    //n<=50
    int n,i,j,k,l,cnt;
    while(cin>>n){
        cnt = 0;
        for(i=0;i<=9;i++){
            for(j=i;j<=9;j++){
                for(k=j;k<=9;k++){
                    for(l=k;l<=9;l++) if(i+j+k+l==n) cnt+=4;
                }
            }
        }
        cout << cnt << endl;
    }
    return 0;
}

C++: #include<iostream>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;
int main(){
  int n;
  while(cin>>n){
    int co=0;
    rep(a,10){
      rep(b,10){
	rep(c,10){
	  if(n-a-b-c>=0&&n-a-b-c<10)co++;
	}
      }
    }
    cout<<co<<endl;
  }

}

C++: #include<stdio.h>

int main(void){

	int a,b,c,d,n,count,i,j,z;
	int	maji[1000];

	i=0;
	
	while(1){
	
		scanf("%d",&n);
		maji[i]=n;
		if(n>50||n<=0||i>999){
			break;
		}
		i++;
			
	}
	
	z=0;
	
	for(j=0;j<i;j++){	
		
		count=0;
		n=maji[z];
		
		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(n==a+b+c+d){
							count++;
						}
					}
				}
			}
		}
		z++;
		printf("%d\n",count);
	}
	return 0;
}

C++: 
#include <stdio.h>

int main()
{
    int n, i, j, k, l, count;
    
   while(scanf("%d", &n) != EOF)
    {
        count = 0;
        for(i = 0; i <= 9; i++)
        {
            for(j = 0; j <= 9; j++)
                {
                    for(k = 0; k <= 9; k++)
                    {
                        for(l = 0; l <= 9; l++)
                        {
                            if(i + j + k + l == n)count++;
                        }
                    }
                }
            }
        printf("%d\n", count);
    }
    return 0;
}

C++: #include<iostream>

using namespace std;

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

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

using namespace std;

int main() {
  while(1) {
    int n, count=0, M[10]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    scanf("%d", &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)
	      count++;
	  }
	}
      }
    }
    printf("%d\n", count);
  }
}

C++: #include <iostream>

using namespace std;

int main()
{
    int count;
    int num;
    while(cin >> num)
    {
        count = 0;
        for(int a = 0; a < 10 && a <= num; ++a)
            for(int b = 0; b < 10 && a + b <= num; ++b)
                for(int c = 0; c < 10 && a + b + c <= num; ++c)
                    for(int d = 0; d < 10 && a + b + c + d <= num; ++d)
                        if(a + b + c + d == num) count++;
        cout << count << endl;
    }
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <vector>
#include <cstdlib>

using namespace std;

int main() {

	int n, i, j, k, l,count=0;

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

	return 0;
}

C++: #include<iostream>
#include<stdio.h>
int main(){
	int a,b,c,d,n,i;

	std::cin>>n;
	i=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){
						i++;
			

						}
					}
				}
			}
	std::cout<<i<<std::endl;

	return 0;
	}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int a,b,c,d,n,x,sum=0,i;
	for(i=0;i<2;i++){
		cin>>x;
	for(a=0;a<=9;a++){
		for(b=0;b<=9;b++){
			for(c=0;c<=9;c++){
				for(d=0;d<=9;d++){
					n=a+b+c+d;
					if(x==n){
						sum++;
					}
				}
			}
		}
	}
	cout<<sum<<endl;
	sum=0;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){

	int n;
	int a , b , c , d;
	int ans , count = 0;

	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++){

						ans = a + b + c + d;
						if(ans == n){
							count++;
						}
					}
				}
			}
		}

		cout << count << endl;
	
	}

	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
	
	int n,s;
	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;
    while(cin>>n){
    int a=0;
    for(int i=0;i<10;i++)
        for(int j=0;j<10;j++)
            for(int p=0;p<10;p++)
                for(int q=0;q<10;q++)
                    if(i+j+p+q==n)
                        a++;
    cout<<a<<endl;
    }
}