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>

using namespace std;

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

C++: #include "iostream"
using namespace std;

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

C++: #include<iostream>

using namespace std;

int main()
{
	int num;
	cin >> 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<bits/stdc++.h>
using namespace std;

int main(){
    int n;
    while(scanf("%d",&n) != EOF){
        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<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
int main(){
  int n;
  while(cin >> n){
    int count = 0;
    rep(i,10){
      rep(j,10){
        rep(k,10){
          rep(l,10){
            if(i+j+k+l == n) count++;
          }
        }
      }
    }
    cout << count << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>

using namespace std;


// cin >>
// cout <<
int main(){
	int in=0;
	int out=0;
	cin >>in;
	if(!cin.eof()){
	    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==in){
					    out++;	
					    }	
				    }
			    }
		    }
	    }
	}
	cout <<out;
	
	return 0;
}

C++: #include <math.h>
#include <iostream>
#include <ios>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <string>

#define YES "YES"
#define NO "NO"
#define space ' '

using namespace std;

void func();

int main(void)
{
	
	func();

	return 0;
}


void func()
{
	

	int n, cnt;
	
	while (cnt = 0, cin >> n, !cin.eof()){


		for (int i = 0; i++ < 9;)
		{
			for (int ii = 0; ii++ < 9;)
			{
				for (int iii = 0; iii++ < 9;)
				{
					for (int iiii = 0; iiii++ < 9;)
					{
						if (i + ii + iii + iiii == n)
							cnt++;

					}
				}
			}
		}

		cout << cnt << endl;
	}
}

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


int main(void) {
	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;
int main(void){
    int n,count;
    count = 0;
    while (cin >> n) {
        for (int i=9;i>-1;i--) {
            if (n-i>=0) {
                for (int j=9;j>-1;j--) {
                    if (n-i-j>=0) {
                        for (int k=9;k>-1;k--) {
                            if (n-i-j-k>=0) {
                                for (int l=9;l>-1;l--) {
                                    if (n-i-j-k-l==0) {
                                        count++;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        cout << count << endl;
        count = 0;
    }
}

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

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

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

int main ()
{
    int	n;

    while (cin >> n) {
        int res = 0;
    	for (int i = 0; i <= 9; i++) {
            for (int j = 0; j <= 9; j++) {
                for (int k = 0; k <= 9; k++) {
                    for (int l = 0; l <= 9; l++) {
                        if (i + j + k + l = n) res++;
                    }
                }
            }
    	}

        cout << res << endl;
    }

    return 0;
}

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

C++: #include <iostream>

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

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

C++: #include <iostream>

using namespace std;

// naive but easy to implement
int calc(int 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++;
          }
        }
      } 
    }
  }

  return count;
}

int main(int argc, char const* argv[])
{
  int n;
  while (cin >> n) {
    cout << calc(n) << endl;
  };
  return 0;
}

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

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