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 i, S, n;
	while (cin >> n) {
		i = 0;
		for (S = 1;S <= 9999;S++) {
			if (S/1000+(S-S/1000*1000)/100+(S-S/100*100)/10+S-S/10*10==n)  
				i++;
		}
		cout << i << endl;
	}
    return 0;
}

C++: #include<cstdio>
int main(){for(int i,c,k,n,j;scanf("%d",&n);k=0){for(i=0;i<1e4;c=0){for(j=i++;j>0;j/=10)c+=j%10;c-n?k:k++;}printf("%d\n",k);}}

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

int main()
{
  int n=0;
  while(cin >> n){
    int res=0;
    if(n>36)
      res = 0;
    else if(n==36)
      res = 1;
    else{
      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)
		res++;
	    }
	  }
	}
      }
    }
    cout << res << endl;
  }

  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main()
{
	int n;
	while(cin >> n)
	{
		int cnt = 0;
		
		for(int i0 = 0; i0 < 10; ++i0)
			for(int i1 = 0; i1 < 10; ++i1) 
				for(int i2 = 0; i2 < 10; ++i2) 
					for(int i3 = 0; i3 < 10; ++i3) 
						if(n == i0 + i1 + i2 + i3) cnt++;
		cout << cnt << endl;
	} 
}

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

int main(){
	int n;

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

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

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

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

int main () {

int n, count = 0;

    cout << "Input n: ";
    cin >> n;

for (int a = 0; a < 10 && a <= n; a++){
    for (int b = 0; b < 10 && b <= n-a; b++){
        for (int c = 0; c < 10 && c <= n-a-b; c++){
            if (n-a-b-c >=0 && n-a-b-c < 10) {
                count++;
            }
        }
    }
}


    cout << count;


    return 0;

}

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

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

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

//using namespace std;


int main(){
    int n=0;

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

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

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

    return 0;
}

C++: #include <bits/stdc++.h>
#define int long long
using namespace std;
const int INF = 1e9 + 7, MOD = 1e9 + 7;
const long long LINF = 1e18;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
signed main() {
	int n, ans;
	while (cin >> n) {
		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 <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
#define f(i) for(i=0;i<=9;i++)
int main(){
    int a,b,c,d,n,s,k=0;
    
    while(scanf("%d",&n)!=EOF){
                               k=0;
    f(a)
        f(b)
            f(c)
                f(d){
                if(n==a+b+c+d)
                k++;
                }  
                
                 cout<<k<<endl;                         
    }  
    return 0;
    
}

C++: #include<iostream>
using namespace std;
int main(){
    int a,b,c,d,n,x=0;
    while(cin >> n){
    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(n==a+b+c+d)x=x+1;
                }
            }
        }
    }
    cout << x << endl;
    x=0;
    }
 return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <string>
#include <cstdlib>
#include <math.h>
#include <algorithm>
using namespace std;

int main()
{
int n;
int count;

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

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;


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