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 <cstdio>
#include <iostream>
#include <iomanip>
#include <string> 
#include <vector> 
using namespace std;

int main(){
	int in,i[4],ans = 0,s[4] = {0,0,0,0};
	cin >> in;
	for(i[0] = 0;9 >= i[0];i[0]++){
		//if(0 > in - i[0]) break;
		//cout << "[1]" <<  i[0] << endl;				
		for(i[1] = 0;9 >= i[1];i[1]++){
			//if(0 > in - ( i[0] + i[1] ) ) break;
			//cout << "[2]" << i[1] << endl;
			for(i[2] = 0;9 >= i[2];i[2]++){
				//if(0 > in - ( i[0] + i[1] + i[2] ) ) break;
				//cout << "[3]" << i[2] << endl;
				for(i[3] = 0;9 >= i[3];i[3]++){
					//if(0 > in - ( i[0] + i[1] + i[2] + i[3] ) ) break;
					//cout << "[4]" << i[3] << endl;
					if(i[0] + i[1] + i[2] + i[3] == in){ans++;}
				}	
			}
		}
	}
	cout << ans << endl;
}

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

int main(){
	int n, a = 0;

	cin >> 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)
						a++;
				}
			}
		}
	}

	cout << a << endl;

	return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
	int n;
	while(cin>>n){
		int 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;
	}
	getchar();
	getchar();
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,count=0,n2,count2=0;
	scanf("%d %d",&n,&n2);
	for(int f1=0;f1<10;f1++){
		for(int f2=0;f2<10;f2++){
			for(int f3=0;f3<10;f3++){
				for(int f4=0;f4<10;f4++){
					if(f1+f2+f3+f4==n){
						count++;
					}
				}
			}
		}
	}
	for(int f1=0;f1<10;f1++){
		for(int f2=0;f2<10;f2++){
			for(int f3=0;f3<10;f3++){
				for(int f4=0;f4<10;f4++){
					if(f1+f2+f3+f4==n){
						count2++;
					}
				}
			}
		}
	}
	printf("%d\n%d",count,count2);
	return 0;
}

C++: #include<bits/stdc++.h>
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 << "\n";
  }
  return 0;
}

C++: #include <iostream>

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

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



int main() {
	int a, b, c, d, n;
	int k = 0;
	while (cin >> n) {
		for (a = 0; a <= 9; a = a + 1) {
			for (b = 0; b <= 9; b = b + 1) {
				for (c = 0; c <= 9; c = c + 1) {
					for (d = 0; d <= 9; d = d + 1) {
						if (a + b + c + d == n) {
k += 1;
						}
					}
				}
			}
		}
	}
	cout << k << endl;
	return 0;
}

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

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

C++: #include <iostream>

int main(void)
{
	int n;

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

C++: #include <stdio.h>
#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int hierarchy(int num);

int main(void) {
    int num, count, i, j, k;
    
    while(scanf("%d", &num) != EOF) {
        int ans = 0;
        switch(hierarchy(num)) {
            case 1:
                j = 6;
                k = 4;
                count = 0;
                for(i = 4; num != count++; ) {
                    ans = i;
                    if(num == count) break;
                    if(count > 1) j += k++;
                    i += j;
                }
                break;
            case 2:
                j = 66;
                k = 1;
                count = 9;
                for(i = 282; num != count++; ) {
                    ans = i;
                    if(num == count) break;
                    if(count > 10) {
                        j += k;
                        k -= 3;
                    }
                    i += j;
                }
                break;
            case 3:
                j = -41;
                k = -11;
                count = 19;
                for(i = 633; num != count++; ) {
                    ans = i;
                    if(num == count) break;
                    if(count > 20) {
                        j += k;
                        k += 3;
                    }
                    i += j;
                }
                break;
            case 4:
                j = -28;
                k = 7;
                count = 29;
                for(i = 84; num != count++; ) {
                    ans = i;
                    if(num == count) break;
                    if(count > 30) j += k--;
                    i += j;
                }
                break;
            default : break;
        }
        cout << ans << endl;
    }
    
    return(0);
}

int hierarchy(int num) {
    if(num >= 0 && num <= 9)
        return(1);
    else if(num >= 10 && num <= 19)
        return(2);
    else if(num >= 20 && num <= 29)
        return(3);
    else if(num >= 30 && num <= 36)
        return(4);
    else
        return(5);
}

C++: #include <iostream>

using namespace std;

int main(void) {
  int n, i = 0;
  while(cin >> n) {
    int num = 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) num++;
          }
        }
      }
    }

    cout << num << '\n';
  }

  return 0;
}