Go: package main

import (
	"fmt"
)

func main() {
	for {
		var a int
		fmt.Scan(&a)
		if a == 0 {
			break
		}
		rs := 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 == a {
							rs++
						}
					}
				}
			}
		}
		fmt.Println(rs)
	}
}

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

using namespace std;

int main()
{
	int n, a, b, c, d;
	int  ans;

	while(cin >> n)
	{
		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;
	
	}

	return 0;
}

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

int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);

  int i, j, k, l, sum, count = 0;

  while (cin >> sum) {
    count = 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 == sum) { count += 1; }
          }
        }
      }
    }
    cout << count << endl;
  }

  return 0;
}

C++: #include<stdio.h>
#include<string.h>
int main(){
	int n,r,a,b,c,d;
	while(scanf("%d",&n)!=EOF){
		r=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){
							r++;
						}
					}
				}
			}
		}
		printf("%d\n",r);
	}
	return 0;
}

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

using namespace std;
int main(void)
{
	int i, j, k, h, n;
	int sum = 0;
	
	scanf("%d", &n);
	
	for (i = 0; i < 10; i++){
		for (j = 0; j < 10; j++){
			for (k = 0; k < 10; k++){
				for (h = 0; h < 10; h++){
					if (i + j + k + h == n){
						sum++;
					}
				}
			}
		}
	}
	
	printf("%d\n", sum);
	
	return (0);
}

C++: #include<iostream>
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++;
					
			
			
		
	}
	cout<<ans;
	return 0;
}

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

int a,b,x;

int mySet(int d){
  for(int i=0;i<10;i++){
    if(d<3){
      mySet(d+1);
    }else if(d==3){
      if(a==x){
      b++;
      }
    }
    a++;
  }
  return a=a-10;
}

int main(void){
  while(scanf("%d",&x)!=EOF){
  mySet(0);
  cout<<b<<endl;
  return 0;
  }
}

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

int n, c = 0;

int main(){
    cin >> n;
    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) c++;
            }
        }
    }
    cout << c << endl;
    return 0;
}

C++: #include <iostream>
using namespace std;
int seach(int n,int m){
	if(m==4){
		return (n==0);
	}
	else{
	int res=0;
	for(int i=0;i<10;i++){
		res+=seach(n-i,m+1);
	}
}
}

int main() {
	int n;
	cin >> n;
	cout << seach(n,0) << endl;
	return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int n;
	while(cin>>n)
	{
		int cont = 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){
							cont++;
						}
					}
				}
			}
		}
		
		cout << cont << endl;
	}
}

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

int main(){
  int n;
  int cnt=0;
  while(std::cin >> n){
  
    for(int a=1;a<10;a++){
      for(int b=1;b<10;b++){
	for(int c=1;c<10;c++){
	  for(int d=1;d<10;d++){
	    if(a+b+c+d==n){
	      cnt++;
	    }
	  }
	}
      }
    }

    std::cout << cnt << std::endl;
    cnt = 0;
  }
}

C++: #include<iostream>

using namespace std;

int main()
{
	int num;

	while(cin>>num){
		int answer = 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==num)
							answer++;
				}
			}
		}
		cout <<answer<<endl;
	}

	return 0;	
}

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

int main(void)
{
	int num, total, ans, tmp,cc[11];

	while (cin >> num) {
		ans = 0;
		tmp = num;
		for (int j = 9; j >= 0; j--) {
			int C[11] = {0};
			C[10] = 4;
			num = tmp;
			for (int i = j; i > 0 && C[10] > 0; i--) {
				while (num-i >= 0) {
					C[10]--;
					C[i]++;
					num -= i;
				}
			}
			total = 0;
			if (num == 0) {
				total = 24;
				bool flag = true;
				for (int i = 0; i < 11; i++) 
					if (cc[i] != C[i]) flag = false;
				if (flag) total = 0;

				for (int i = 0; i < 11; i++) {
					cc[i] = C[i];
					while (C[i] > 0) {
						total /= C[i];
						C[i]--;
					}
				}
			}
			ans += total;
		}
		
		cout << ans << endl;
	}
	
	return 0;
}

C++: #include <iostream>

int main(){
	
	int e;
	int f=0;
	while(std::cin>>e){
		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==e){
							
							f++;
						}
		            }
		        }
		    }
		}
		std::cout<<f<<std::endl;
		f=0;
	}
    
    return 0;
    
}

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

int main(){
  
  vector<int> count_array;
  int count;
  int in_num;
  int a,b,c,d,i=0;
  while(cin>>in_num){
    count=0;
    if(in_num>36){
      count_array.push_back(0);
    }
    else{
      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)==in_num){
		cout<<"("<<a<<","<<b<<","<<c<<","<<d<<")"<<endl;
		count++;
	      }
	    }
	  }
	}
      }
      count_array.push_back(count);
    }
    i++;
  }
  for(int j=0;j<i;j++){
    cout<<count_array[j]<<endl;
  } 
}

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) {
					int a = n - i - j - k;
					if (0 <= a && a <= 9) cnt++;
				}
			}
		}

		cout << cnt << endl;
	}
}

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

int main(){
	int t = 0;
	int n;
	int a[1000];
	while(cin >> n){
		if(n > 36){
			a[t] = 0;
			continue;
		}
		else if(n > 18){
			n = 36-n;
		}
		a[t] = 1;
		for(int i = n+3; i >n; i--){
			a[t] = a[t]*i;
		}
		t++;
	}
	for(int i = 0; i < t; i++){
		cout << a[i]/6 << endl;
	}
}

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

using namespace std;

int main()
{
	int n, a, b, c, d;
	double  ans;

	while(cin >> n)
	{

	for(a = 0; a < 10; a++)
	{
		ans = 0;
			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 ++;
							}
					}
			}
	}
	printf("%.0f\n", ans);
	
	}

	return 0;
}

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

int main()
{
	int a, b, c, d, n, iCount;

	while( cin >> n ){
		iCount = 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 )
							iCount++;
					}
				}
			}
		}

		cout << iCount << endl;

	}

	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){

	int n;
	int a , b , c , d;
	int ans , count;

	while(cin >> n){
		if(n == 0) break;

		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++){

						ans = a + b + c + d;
						if(ans == n){
							count++;
						}
					}
				}
			}
		}

		cout << count << endl;
	
	}

	return 0;
}