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>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <sstream>
#include <string>
#include <cstdlib>
using namespace std;

template <class T> int streamvar(std::istream& in, T& var)
{
    if (!in) {
        cerr << "invalid istream" << endl;
        return 1;
    }
    in >> var;
    if (in.fail()) {
//cerr << "no var" << endl;
        return 1;
    }
    return 0;
}
template <class T> int streamvec(std::istream& in, std::vector<T> &v)
{
    v.clear();
    string s;

    if (!in) {
        cerr << "invalid istream" << endl;
        return 1;
    }
    getline(in, s);
    if (in.fail()) {
        cerr << "no line" << endl;
        return 1;
    }
    istringstream is(s);
    while (1) {
        T tmp;
        is >> tmp;
        if (is.fail())
            break;
        v.push_back(tmp);
    }
    return 0;
}

int main(void)
{
    int n;
    while (!streamvar(cin, n)) {
        int counter = 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)
                            counter++;
        cout << counter << endl;
    }
    return 0;
}

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

using namespace std;


bool solve(){
	
	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++){
					for(int l=0;l<=9;l++){
						if(i+j+k+l == n){
							cnt++;
						}
					}
				}
			}
		}
		cout<< cnt<< endl;
	}
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

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

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

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

int main() {
    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<bits/stdc++.h>
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++;
						}
					}
				}
			}
		}
		printf("%d\n",ans );
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <set>

using namespace std;

int main(void) {
    int i, j, k, l, N;
    while(cin >> N) {
        int ans = 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 == N) {
                            ans++;
                        }
                    }
                }
            }
        }
        cout << ans << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
	int n;
	int res = 0;

	cin >> n;
	int i;
	for (i = 0; i < 10000; ++i){
		int a = i/1000;
		int b = (i/100) % 10;
		int c = (i/10) % 10;
		int d = i % 10;
		
		if (a + b + c + d == n){
			++res;
		} // end if
	} // end for

	cout << res << 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++){
					for(int p=0;p<10;p++){
						if(i+j+k+p==n)count++;
					}
				}
			}
		}
		cout<<count<<endl;
	}
}

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

int main( void ){
    int nCount = 0;
    int n[50];
    int m = 0;
    char str[3];
    while( true ){
        gets( str );
        if(( n[m] = atoi(str)) == -1 ) break;
        m++;
    }
    for( int a = 0;i < m;a++ ){
    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] ) nCount++;
                }
            }
       }
    }
    printf( "%d\n",nCount );
    }
    return 0;
}

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

int main(){
	int count = 0;
	int n, t = 0;
	int out[100] = {0};
	while(cin >> n){
		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){
							out[t]++;
							count++;
						}
					}
				}
			}
		}
		t++;
	}
	for(int i = 0; i < t; i++){
		cout << out[i] << endl;
	}
	cout << count << endl;
}

C++: #include <stdio.h>

int main(void){
	int n;
	int a,b,c,d;
	int cnt;
	int i,j,k,l;

	while(scanf("%d",&n) != EOF){
		cnt = 0;
		if(n <= 36){
			for(i = 1;i < 10;i++){
				for(j = 1;j < 10;j++){
					for(k = 1;k < 10;k++){
						for(l = 1;l < 10;l++){
							if(i+j+k+l == n)
								cnt++;
						}
					}
				}
			}
		}
		if(n > 36)
			cnt =0;
		printf("%d\n",cnt);
	}
}

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

int main(void){
     int n,i=0;
     cin >> n;
     if(n != 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(n == a+b+c+d){
				   i = i+1;
			      }
			 }
		    }
	       }
	  }
     }else{
	  i = i+1;
     }
     cout << i << endl;

     return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
int n;
int count=0;

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

return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <vector>
#include <cmath>
#include <cctype>
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++){
	  for(int l=0;l<=9;l++){
	    if(i+j+k+l==n)cnt++;
	  }
	}
      }
    }
    cout<<cnt<<endl;
  }
  return 0;
}