Go: package main

import "fmt"

var count int

func main() {
	var inputNum int
	for {
		fmt.Scanf("%d", &inputNum)
		fmt.Printf("%d\n", calcA(inputNum))
		count = 0
	}
}

func calcA(input int) int {
	for i := 0; i <= 9; i++ {
		calcB(input, i)
	}
	return count
}

func calcB(input, a int) {
	for i := 0; i <= 9; i++ {
		calcC(input, a, i)
	}
}

func calcC(input, a, b int) {
	for i := 0; i <= 9; i++ {
		calcD(input, a, b, i)
	}
}

func calcD(input, a, b, c int) {
	for i := 0; i <= 9; i++ {
		if a+b+c+i == input {
			count++
		}
	}
}

C++: #include <bits/stdc++.h>
#define int long long
using namespace std;
const int INF = 1e9 + 7, MOD = 1e9 + 7;
const long long LINF = 1e18;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
signed main() {
	int n, ans;
	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;
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
#define f(i) for(i=0;i<=9;i++)
int main(){
    int a,b,c,d,n,s,k=0;
    
    while(scanf("%d",&n)!=EOF){
                               k=0;
    f(a)
        f(b)
            f(c)
                f(d){
                if(n==a+b+c+d)
                k++;
                }  
                
                 cout<<k<<endl;                         
    }  
    return 0;
    
}

C++: #include<iostream>
using namespace std;
int main(){
    int a,b,c,d,n,x=0;
    while(cin >> n){
    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)x=x+1;
                }
            }
        }
    }
    cout << x << endl;
    x=0;
    }
 return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <string>
#include <cstdlib>
#include <math.h>
#include <algorithm>
using namespace std;

int main()
{
int n;
int count;

 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;
return 0;
}

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;


int main(){
    int n;
    while(scanf("%d",&n)!=EOF){
        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==n) ans++;
                    }
                }
            }
        }
        printf("%d\n",ans);
    }
    return 0;
}

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

using namespace std;

int main(){
    int n;
    while(cin>>n&&n!=EOF){
        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==n)ans++;
                    }
                }
            }
        }
    cout<<ans<<endl;
    }
    return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
using namespace std;

#define FOR(i,a,b) for(long long int i=(a);i<(b);i++)
#define REP(i,n) for(long long int i=0;i<(n);i++)
#define ALL(s) (s).begin(),(s).end()

#define PI 3.14159265358479

typedef long long int ll;
typedef vector<long long int> vi;

int main(){
	ll n, c = 0;
	while (cin >> n){
		REP(i, 10){
			REP(j, 10){
				REP(k, 10){
					REP(l, 10){
						if (i + j + k + l == n){
							c++;
							cout << i << "+" << j << "+" << k << "+" << l << "+=" << n << "\n";
						}
					}
				}
			}
		}
		cout << c << "\n";
		c = 0;
	}
}

C++: // http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0008&lang=jp

#include <iostream>
using namespace std;

int main() {
  int n ;
  while (cin >> n) {
    int count = 0;
    for (auto i=0; i<10; i++) {
      for (auto j=0; j<10; j++) {
	for (auto k=0; k<10; k++) {
	  for (auto l=0; l<10; l++) {
	    if (i+j+k+l == n) count++;
	  }
	}
      }
    }
    cout << count << endl;
  }
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,x,n) for(int i=(x);i<(n);i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define ub upper_bound
#define lb lower_bound
#define int long long
using namespace std;
const int MOD=1000000007;
const int INF=1000000009;

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

C++: #include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;

int main(void) {
    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<iostream>
using namespace std;

int main() {
	int n,count;
	while ( cin >> n , 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 a,b,c,d,count;
      count = 0;
      int num[100];
      int max;
      int n;
      
      for (int v=0;v<100;v++) {
      	num[v] = 100;
      	cin >> num[v];
      	if (!(0<=num[v]&&num[v]<=50)){
      		max = v-1;
      		break;
      	}
      }
      for (int w=0;w<=max;w++){
      	n=num[w];
      	count = 0;
      	for (int i=0;i<=9;i++) {
            a=i;
            if (n-a<0) {

            	break;
            }
            for (int j=0;j<=n-a&&j<=9;j++) {
            	b=j;
            	if (n-a-b < 0) {
            		break;
            	}
            	for (int k=0;k<=n-a-b&&k<=9;k++) {
            		c=k;
            		if (n-a-b-c < 0) {
            			break;
            		}
            		
            		for (int l=0;l<=n-a-b-c&&l<=9;l++) {
            			d=l;
            			if (n==a+b+c+d) {
            				//cout << a << b << c << d <<(a+b+c+d)<<endl;
            				count++;
            			}
            			if (n-a-b-c-d < 0) {
            			break;
            		}
            		}
            	}
            }
      }
      
      cout << count <<endl;
      }
      return 0;
}

C++: #include <stdio.h>

int main(void) {
	int n;
	while (scanf("%d", &n) == 1) {
		int total = 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)
				total++;
		}}}}
		printf("%d\n", total);
	}
	return 0;
}