Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
	}
	for _, value := range resultArr {
		fmt.Println(value)
	}
}

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 <stdio.h>

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

C++: #include<iostream>

using namespace std;

int main()
{
	int a,b,c,d;
	int n;
	int cont = 0;
	
	while(cin >> n){
		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>
#include <cstdio>

using namespace std;

int main() {
  while(1) {
    int n, count=0, M[10]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    scanf("%d", &n);
    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++;
	  }
	}
      }
    }
    printf("%d\n", count);
  }
}

C++: #include <iostream>

using namespace std;

int main()
{
    int count;
    int num;
    while(cin >> num)
    {
        count = 0;
        for(int a = 0; a < 10 && a <= num; ++a)
            for(int b = 0; b < 10 && a + b <= num; ++b)
                for(int c = 0; c < 10 && a + b + c <= num; ++c)
                    for(int d = 0; d < 10 && a + b + c + d <= num; ++d)
                        if(a + b + c + d == num) count++;
        cout << count << endl;
    }
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <vector>
#include <cstdlib>

using namespace std;

int main() {

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

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

	return 0;
}

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>
#include<algorithm>
using namespace std;
int main(){
	int a,b,c,d,n,x,sum=0,i;
	for(i=0;i<2;i++){
		cin>>x;
	for(a=0;a<=9;a++){
		for(b=0;b<=9;b++){
			for(c=0;c<=9;c++){
				for(d=0;d<=9;d++){
					n=a+b+c+d;
					if(x==n){
						sum++;
					}
				}
			}
		}
	}
	cout<<sum<<endl;
	sum=0;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){

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

	while(cin >> n){

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

C++: #include<iostream>

using namespace std;

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

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

int main(){
    int n;
    while(cin>>n){
    int a=0;
    for(int i=0;i<10;i++)
        for(int j=0;j<10;j++)
            for(int p=0;p<10;p++)
                for(int q=0;q<10;q++)
                    if(i+j+p+q==n)
                        a++;
    cout<<a<<endl;
    }
}

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

int main(){
	int n, tn, count;
	while(cin >> n){
		count = 0;
		for(int a = ( 27 < n ) ? (n - 27) : 0; a < 10; a++){
			int na = n - a;
			for(int b = ( 18 < na ) ? (na - 18) : 0; b < 10; b++){
				int nb = na - b;
				for(int c = ( 9 < nb ) ? (nb - 9) : 0; c < 10; c++){
					int nc = nb - c;
					if(0 <= nc && nc < 10)
						count++;
				}
			}
		} 
	cout << count << endl;
	}
	return 0;
}

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

int ans = 0;

void SofI(int num, int n) {
	if (num > n * 9) { return; }
	else if (num < 0) { return; }
	else if (num != 0 && n == 0) { return; }
	else if (num == 0) {
		ans++;
		return;
	}
	else {
		for (int i = 0; i < 10; i++) {
			SofI(num - i, n - 1);
		}
	}

}

int main(void) {
	int ans = 0;
	int num;
	cin >> num;
	SofI(num, 4);
	cout << ans << endl;
	return 0;
}

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

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

C++: #include <iostream>

using namespace std;

int main(){
    int n;

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

        cout << ans << endl;
    }
    return 0;
}

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

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


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

C++: #include<bits/stdc++.h>
 
using namespace std;
 
#define rep(i, n) repi(i,0,n)
#define repi(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define pb push_back
 
 
int main(){
    int x;
    int n=10;

    while(cin>>x){

        int count=0;

        for(int i=0;i<n;i++){
            for(int j=0;j<n;j++){
                for(int k=0;k<n;k++){
                    for(int l=0;l<n;l++){
                        if(i+j+k+l==x){
                            count++;
                            // cout<<i<<" "<<j<<" "<<k<<" "<<l<<endl;
                        }
                    }
                }
            }
        }

        cout<<count<<endl;
    }


}

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

int main(void)
{
    int cnt = 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)
                            ++cnt;
        cout << cnt << endl;
    }
    return 0;
}