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

using namespace std;



main(){

  int n;
  
  while(cin >> n){
  
    int ca=0;
    int a,b,c,d;

    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)ca++;
	    
	  }
	}
      }
    }
    cout << ca << endl;
  }
  
  
  return 0;


}

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

int main()
{
	int n, a, b, c, d, cnt = 0;
	while (scanf("%d", &n) != EOF)
	{
		cnt = 0;
		if (n > 36)
		{
			printf("0\n");
			continue;
		}
		for (a = 0; a < 10; a++)
		{
			if (n - a>27)continue;
			for (b = a; b < 10; b++)
			{
				if (n - a - b > 18)continue;
				for (c = b; c < 10; c++)
				{
					if (n - a - b - c > 9)continue;
					for (d = c; d < 10; d++)
					{
						if (a + b + c + d == n)
						{
							if ((a == b) && (a == c) && (a == d))cnt++;
							else if (((a == b) && (b == c)) | ((b == c) && (c == d)))cnt += 4;
							else if ((a == b) | (b == c) | (c == d))cnt += 12;
							else cnt += 24;
						}
						else continue;
					}
				}
			}
		}

		printf("%d\n", cnt);
	}
}

C++: #include <stdio.h>

int main( void ){
    int nCount = 0,input;
    scanf( "%d",&input );

    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 == input ) nCount++;
                }
            }
       }
    }

    printf( "%d",nCount );
    return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
	int n;
	while(cin>>n){
		int num=0;
		for( int i=0;i<10000;i++ ){
			if( (i-i/10*10)+
			    (i-i/100*100)/10+
			    (i-i/1000*1000)/100+
			    i/1000
			    ==n
			){
				num++;
			}
			
		}
		cout<<num<<endl;
	}
	return 0;
}

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

int main() {
	int count, n;
	while (cin >> n) {
		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 l = 0; l < 10; ++l) {
						if ((i + j + k + l) == n) count++;
					}
				}
			}
		}
		cout << count << endl;
	}
	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;
				if(0 <= m && m<10){
					ans++;
				}
			}
		}		
	}
	cout << ans << endl;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <time.h>
#include <math.h>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
#include <bitset>
using namespace std;
#define rep(I,N) for(int I = 0; I < (int)(N); I++)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 30)
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;
int StrToInt(string);
string IntToStr(int);

int main(void){
	int dp[4][36];
	fill_n(*dp, 4*36, 0);
	rep(i, 10)dp[0][i] = 1;
	for(int i = 1; i <= 3; i++){
		for(int j = 36; j >= 0; j--){
			for(int k = 0; k <= 9; k++){
				if(j-k < 0)break;
				dp[i][j] += dp[i-1][j-k];
			}
		}
	}
	int n;
	while(cin >> n)
		FIN(dp[3][n]);

	return 0;
}

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

int main(void){
while(1){
int n;
cin >> n;

int a,b,c,d,cnt=0;
for(a=0; a<=9&&a<=n; a++){
for(b=0; b<=9&&a+b<=n; b++){
for(c=0; c<=9&&a+b+c<=n; c++){
d = n-a-b-c;
if(0<=d&&d<=9)cnt++;
}}}

cout << cnt << endl;
}
}

C++: #include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <deque>
#include <algorithm>
#include <iomanip>
#include <functional>
#include <numeric>

#define REP(i, n) for(int i = 0;i < (n); i++)
#define REP2(i, x, n) for(int i = (x); i < (n); i++)
#define REPR(i, n) for(int i = (n); i >= 0; i--)

#define ALL(a) (a).begin(),(a).end()
#define SORT(c) sort((c).begin(),(c).end())
#define DESCSORT(c) sort(c.begin(), c.end(), greater<int>())

#define LL long long int
#define LD long double

#define PI 3.14159265358979

using namespace std;

//================================================

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	int N, ans = 0;
	while (cin >> N) {
		REP(a, 10) REP(b, 10) REP(c, 10) REP(d, 10) if (a + b + c + d == N) ans++;
		cout << ans << "\n";
		ans = 0;
	}
	return 0;
}

C++: #include<iostream>
#include <cstdio>
#include<cmath>
#include<vector>
#include<algorithm>

using namespace std;

////Nayeem Shahriar Joy,Applied Physics &Electronic Engineering,University of Rajshahi.

int main()

{
    int count=0,n;
    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;
    count=0;
    }
}

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

using namespace std;

int main(void) {
	int n;
	while(scanf("%d", &n) != EOF) {
		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 == 35)		count++;
					}
				}
			}
		}
		cout << count << endl;
	}
	
	return 0;
}

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

using namespace std;

int main() {
    int n, count;
    while(1) {
      count=0;
      scanf("%d", &n);
      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 main() {
  int sum;
  while (cin >> sum) {
    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 == sum) ans++;
          }
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}

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

#define upper 9

using namespace std;

int main(void){
	int n = 0;
	vector<int> vec;
	while(cin >> n){
		int count = 0;
		for(int a=0; a<=upper; ++a){
			for(int b=0; b<=upper; ++b){
				for(int c=0; c<=upper; ++c){
					for(int d=0; d<=upper; ++d){
						if ((a+b+c+d) == n){
							++count;
						}
					}
				}
			}
		}
		vec.push_back(count);
	}
	vector<int>::iterator it = vec.begin();
	while(it != vec.end()){
		cout << *it << endl;
		++it;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int x,ans;
int main(){
while(1){
ans=0;
cin>>x;
if(x<=0)return 0;
for(int i=0;i<10;i++){
for(int j=0;i<10;j++){
for(int k=0;k<10;k++){
if(x-(i+j+k)<10){
if(x-(i+j+k)>=0){
ans++;
}
}
}
}
}
cout<<ans;
}
}