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 <stdio.h>
#include <Windows.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;a < m+1;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 );
    nCount = 0;
    }
    return 0;
}

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

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

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



int main() {
	int a, b, c, d, n;
	int k = 0;
	while (cin >> n) {for (a = 0; a <= 9; a = a + 1) {for (b = 0; b <= 9; b = b + 1) {for (c = 0; c <= 9; c = c + 1) {for (d = 0; d <= 9; d = d + 1) {if (a + b + c + d == n) {
k += 1;}}}}}}cout << k << endl;return 0;}

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

int integar(int n);

int main(){
    int n;
    while(cin >> n){
        cout << integar(n) << endl;
    }
}

int integar(int n){
    int sum=0;
    int i,j,k,l;
    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)
                        sum++;
                }
            }
        }
    }
    return sum;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n,ans;
  while(cin >> n && n != EOF){
    ans = 0;
    for(int i1 = 0;i1 <= 9;i1++){
       for(int i2 = 0;i2 <= 9;i2++){
	  for(int i3 = 0;i3 <= 9;i3++){
	     for(int i4 = 0;i4 <= 9;i4++){
	       if(n == i1 + i2 + i3 + i4)ans++;
	     }
	  }
       }
    }
    cout << ans <<endl;
  }
  return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<cmath>
#include<queue>
#include<stack>
#include<functional>
#include<string>
#include<cstring>
#include <sstream>
using namespace std;
int main(void){
    int n,ans,i,j,k,l;
    while(cin >> n){
    ans = 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){
                        ans++;
                    }
                }
            }
        }
    }
    cout << ans << endl;
    }
    return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,count=0,n2,count2=0;
	scanf("%d %d",&n,&n2);
	for(int f1=0;f1<10;f1++){
		for(int f2=0;f2<10;f2++){
			for(int f3=0;f3<10;f3++){
				for(int f4=0;f4<10;f4++){
					if(f1+f2+f3+f4==n){
						count++;
					}
				}
			}
		}
	}
	for(int f1=0;f1<10;f1++){
		for(int f2=0;f2<10;f2++){
			for(int f3=0;f3<10;f3++){
				for(int f4=0;f4<10;f4++){
					if(f1+f2+f3+f4==n){
						count2++;
					}
				}
			}
		}
	}
	printf("%d\n%d\n",count,count2);
	return 0;
}

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

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

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

C++: #include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) cerr << #x << "=" << static_cast<bitset<16> >(x) << endl;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)

const int INF = 10000000;
int dx[4]={1, 0, -1, 0}, dy[4]={0, 1, 0, -1};
using namespace std;
typedef long long  ll;

int main()
{
	int n;
	
	while (cin>>n) {
		int ans=0;
		rep(i, 10) {
			rep(j, 10) {
				rep(k, 10) {
					if (n-i-j-k>=0 && n-i-j-k<10)
						ans++;
				}
			}
		}
		cout << ans << endl;
	}
}

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

C++: //#define scanf_s scanf
#include <stdio.h>
#include <string>
#include <iostream>
using namespace std;
#define MAX 20
int main(void)
{
	int n,cou = 0;
	int i = 0, j = 0, l = 0, k = 0;
	while (scanf_s("%d", &n) != EOF) {
		for (int i = 0; i <= 9 && i <= n; ++i) {
			for (int j = 0; j <= 9 && i + j <= n; ++j) {
				for (int l = 0; l <= 9 && i + j + l <= n; ++l) {
					for (int k = 0; k <= 9 && i + j + l + k <= n; ++k) {
						if (i + j + l + k == n) ++cou;
					}
				}
			}
		}
		printf("%d\n", cou);
		cou = 0;
	}
}

C++: #include<iostream>

using namespace std;

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

C++: #include<iostream>
using namespace std;
int main(){
	int n, i, j, k, l, C = 0;
	while (cin >> n){
		C = 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 (n == i + j + k + l){
							C = C+1;
						}
					}
				}
			}
		}
		cout << C << endl;
	}
	return 0;
}

C++: #include <iostream>

int count_pattern( unsigned int const& n )
{
    int ans=0;
    for ( unsigned int a = 0; a < 10; ++a )
    {
        for ( unsigned int b = 0; b < 10; ++b )
        {
            for ( unsigned int c = 0; c < 10; ++c )
            {
                for ( unsigned int d = 0; d < 10; ++d)
                {
                    if ( a+b+c+d == n ) ++ans;
                }
            }
        }
    }
    return ans;
}

int main()
{
    int n;
    while (std::cin >> n)
    {
        std::cout << count_pattern(n) << std::endl;
    }
    return 0;
}