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 <iostream>

int n;

bool get_input()
{
//	std::cout << "get_input" << std::endl;
	return (std::cin >> n);
}

// no_use: Â©¦éÌÂ
int solve(int sum, int no_use)
{
//	std::cout << "solve " << "sum: " << sum << "no_use: " << no_use << std::endl;
	if (no_use == 1) {
		if (0 <= sum && sum <= 9) {
			return 1;
		} else {
			return 0;
		}
	} else {
		int ans = 0;
		for (int i = 9; i >= 0; i--) {
			if (sum < i) continue;
			ans += solve(sum - i, no_use - 1);
		}
		return ans;
	}
}

void output(int ans)
{
	std::cout << ans << std::endl;
}

int main(void)
{
	while (get_input()) {
		output(solve(n, 4));
	}
	return 0;
}

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

int main() {
    int ans[100] ={};
    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) {
                    ++ans[a + b + c + d];
                } 
            }
        }
    }

    int n;
    while (cin >> n) {
        cout << ans[n] << endl;
    }
    
    return 0;
}

C++: #include <iostream>
#include <cstring>
using namespace std;
int ans[51];
void rec(int sum, int d){
  if(d == 4){
    ans[sum]++;
    return;
  }
  for(int i = 0 ; i <10; i++){
    rec(sum+i,d+1);
  }
}
void init(){
  memset(ans,0,sizeof(ans));
  rec(0,0);
}
int main(){
  int n;
  init();
  while(cin >> n){
    cout << ans[n] << endl;
  }
  return 0;
}

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

using namespace std;

int main() {
  int n, count;
  while(!feof(stdin)) {
    scanf("%d",&n);
    if(feof(stdin))break;
    count=0;
    if(n == EOF) break;
    for(int i=0;i<10;i++) {
      for(int j=0;j<10;j++) {
	for(int k=0;k<10;k++) {
	  if(i+j+k>=n-9 && i+j+k<=n)count++;
	}
      }
    }
    printf("%d\n", count);
  }
}

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

int combination(int n){
  int temp = 0;
  for(int i = 0;i < 10;i++)
    for(int j = 0;j < 10;j++)
      for(int k = 0;k < 10;k++)
	if((n - i - j - k) >= 0 && (n -i -j -k) <10)
	  temp++;
  return temp;
}


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

C++: #include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <string>
#include <istream>
 
#define INPUT_FROM_FILE (0)
#if INPUT_FROM_FILE
#include <fstream>
#endif


 int main(int argc, char **argv){
	int n = 0;
	std::string buf;
 
#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
#endif
 
 
#if INPUT_FROM_FILE
	while(std::getline(ifs, buf)){
#else
	while(std::getline(std::cin, buf)){
#endif
		int count = 0;
		n = std::atoi(buf.c_str());

		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){
							count++;
						}
					}
				}
			}
		}
		std::cout << count << std::endl;
	}
    return 0;
}

C++: #include <stdio.h>
 
using namespace std;
 
 
int main(){
    int n,count;
    while(scanf("%d",&n)!=EOF){
        if(n >= 37){
            printf("0\n");
        }else{
            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++;
                        }
                    }
                }
            }
            printf("%d\n",count);
        }
    }
 
    return 0;
}

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

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

C++: #define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include<iomanip>
#include<vector>
#include<cmath>
#include <algorithm>

using namespace std;


int main()
{
	int n, counter = 0;
		while (scanf("%d", &n) == -1){
		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<iostream>
using namespace std;
int main()
{
	int n;
	int i, j, k, t;
	int cnt=0;
	//cin >> n;
	while (cin >> n)
	{
		cnt = 0;
		for (i = 0; i <= 9; i++)
		{
			for (j = 0; j <= 9; j++)
			{
				for (k = 0; k <= 9; k++)
				{
					for (t = 0; t <= 9; t++)
					{
						if (i + j + k + t == n)
						{
							cnt++;
						}
					}
				}
			}
		}
		cout << cnt << endl;
		//cin >> n;
	}
	return 0;
}

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

int AgreementCountAnswer(int n)
{
	int AgreementCount = 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) AgreementCount++;
				}
			}
		}
	}
	return AgreementCount;
}

int main()
{
	while(true){
		int n;
		cin >> n;
		if(cin.eof() == true) break;
		cout << AgreementCountAnswer(n) << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>

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

int main()
{
    int in=0;
    
    while(cin >> in){
        
        int cnt=0;
        
        for (int n=0; n<10; n++) {
            for (int o=0; o<10; o++) {
                for (int p=0; p<10; p++) {
                    for (int q=0; q<10; q++) {
                        if(in == n+o+p+q) cnt++;
                    }
                }
            }
        }
        
        cout << cnt << endl;
    }
}

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

using namespace std;


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

	while(cin >> n){
		for(int i=0;i<10;i++){
			for(int j=0;j<10;j++){
				for(int x=0;x<10;x++){
					for(int y=0;y<10;y++){
						if(i+j+x+y == n)ans++;
					}
				}
			}
		}
		printf("%d\n",ans);
		ans = 0;
	}

	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int n;
  while(scanf("%d",&n)!= EOF){
    int ans  = 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)ans++;
	  }
	}
      }
    }
    cout << ans << endl;
  }
}