Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

func main() {
	scanner.Split(bufio.ScanWords)

	counts := map[int]int{}
	for i := 0; i < 10; i++ {
		for j := 0; j < 10; j++ {
			for k := 0; k < 10; k++ {
				for l := 0; l < 10; l++ {
					s := i + j + k + l
					if s <= 50 {
						counts[s]++
					}
				}
			}
		}
	}
	// fmt.Println(counts)
	for {
		n, err := nextInt()
		if err != nil {
			break
		}
		cnt, ok := counts[n]
		if ok {
			fmt.Println(cnt)
		} else {
			fmt.Println(0)
		}
	}
}

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

using namespace std;


bool solve(){
	
	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;
	}
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

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

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

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<bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[])
{
	int a;
	while (cin>>a)
	{
		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==a)
						{
							ans++;
						}
					}
				}
			}
		}
		printf("%d\n",ans );
	}
	return 0;
}

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

using namespace std;

int main(void) {
    int i, j, k, l, N;
    while(cin >> N) {
        int ans = 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 == N) {
                            ans++;
                        }
                    }
                }
            }
        }
        cout << ans << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
	int n;
	int res = 0;

	cin >> n;
	int i;
	for (i = 0; i < 10000; ++i){
		int a = i/1000;
		int b = (i/100) % 10;
		int c = (i/10) % 10;
		int d = i % 10;
		
		if (a + b + c + d == n){
			++res;
		} // end if
	} // end for

	cout << res << endl;	
		
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int n;
	while(cin>>n){
		int count=0;
		for(int i=0;i<10;i++){
			for(int j=0;j<10;j++){
				for(int k=0;k<10;k++){
					for(int p=0;p<10;p++){
						if(i+j+k+p==n)count++;
					}
				}
			}
		}
		cout<<count<<endl;
	}
}

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

int main( void ){
    int nCount = 0;
    int n[50];
    int m = 0;
    char str[3];
    while( true ){
        gets( str );
        if(( n[m] = atoi(str)) == -1 ) break;
        m++;
    }
    for( int a = 0;i < m;a++ ){
    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[a] ) nCount++;
                }
            }
       }
    }
    printf( "%d\n",nCount );
    }
    return 0;
}

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

int main(){
	int count = 0;
	int n, t = 0;
	int out[100] = {0};
	while(cin >> n){
		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){
							out[t]++;
							count++;
						}
					}
				}
			}
		}
		t++;
	}
	for(int i = 0; i < t; i++){
		cout << out[i] << endl;
	}
	cout << count << endl;
}

C++: #include <stdio.h>

int main(void){
	int n;
	int a,b,c,d;
	int cnt;
	int i,j,k,l;

	while(scanf("%d",&n) != EOF){
		cnt = 0;
		if(n <= 36){
			for(i = 1;i < 10;i++){
				for(j = 1;j < 10;j++){
					for(k = 1;k < 10;k++){
						for(l = 1;l < 10;l++){
							if(i+j+k+l == n)
								cnt++;
						}
					}
				}
			}
		}
		if(n > 36)
			cnt =0;
		printf("%d\n",cnt);
	}
}

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

int main(void){
     int n,i=0;
     cin >> n;
     if(n != 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(n == a+b+c+d){
				   i = i+1;
			      }
			 }
		    }
	       }
	  }
     }else{
	  i = i+1;
     }
     cout << i << endl;

     return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
int n;
int 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;

return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <vector>
#include <cmath>
#include <cctype>
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;
  }
  return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
    int i,j,line,k,l,input;
    while(scanf("%d",&input)!=EOF)
    {
        int result=0,ans1,ans;
        for(i=0;i<10;i++)
        {
            ans=i*3;
            ans1=input-ans;
            if(ans1<10 && ans1>=0)
            {
                result+=4;
            }
        }
        printf("%d\n",result);
    }

    return 0;
}