Go: package main

import (
  "fmt"
)

func main() {
  var a int
  var b int
  for _, err := fmt.Scan(&a); err == nil; _, err = fmt.Scan(&a) {
    b = 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) {
              b++
            }
          }
        }
      }
    }
  fmt.Println(b)
  }
}

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

C++: #include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
    int i,j,line,k,l,input;
    while(scanf("%d",&input)!=EOF)
    {
        int result=0,ans1,ans;
        for(i=0;i<10;i++)
        {
            ans=i*3;
            ans1=input-ans;
            if(ans1<10 && ans1>=0)
            {
                result+=4;
            }
        }
        printf("%d\n",result);
    }

    return 0;
}

C++: //
//  main.cpp
//  CppTest
//
//  Created by Ryu on 2017/02/08.
//  Copyright ?? 2017??´ Ryu. All rights reserved.
//

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
using namespace std;

int main(int argc, const char * argv[]) {
    // insert code here...
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n[50];
    int comb[50];
    int m = 0;
    while (cin >> n[m]) {
        if(n[m] <= 18){
            if (n[m] <= 9) {
                comb[m] = powl(4, n[m]);
            }else{
                comb[m] = powl(4, n[m]);
                for (int i = n[m]; i >= 9; i--) {
                    comb[m] -= powl(3, n[m] - 9) * 4;
                }
            }
        }else if(n[m] <= 36){
            n[m] = 36 - n[m];
            if (n[m] <= 9) {
                comb[m] = powl(4, n[m]);
            }else{
                comb[m] = powl(4, n[m]);
                for (int i = n[m]; i >= 10; i--) {
                    comb[m] -= powl(3, n[m] - 9) * 4;
                }
            }
        }else{
            comb[m] = 0;
        }
        m++;
    }
    
    for (int i = 0; i < m; i++) {
        printf("%d\n", comb[i]);
    }
    printf("\n");
    
    return 0;
}

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

using namespace std;


// cin >>
// cout <<
int main(){
	int in=0;
	int out=0;
	while(cin>>in){
	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;
}