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(){for(int i,c,k,n,j;cin>>n;k=0){for(i=0;i<1e4;i++,c=0){for(j=i;j>0;j/=10)c+=j%10;if(c==n)k++;}cout<<k<<endl;}}

C++: #include <iostream>

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>                                                                                                       
                                                                                                                          
using namespace std;                                                                                                      
                                                                                                                          
int main() {                                                                                                              
  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;                                                                                                
  }                                                                                                                       
}

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

int main() {
      int a,b,c,d,count;
      count = 0;
      int num[100];
      int max;
      int n;
      for (int v=0;v<100;v++) {
      	cin >> num[v];
      	if (0<=num[v]<=50){
      		max = v;
      		break;
      	}
      }
      for (int w=0;w<=max;w++){
      	n=num[w];
      	for (int i=0;i<=9;i++) {
            a=i;
            if (n-a<0) {

            	break;
            }
            for (int j=0;j<=n-a&&j<=9;j++) {
            	b=j;
            	if (n-a-b < 0) {
            		break;
            	}
            	for (int k=0;k<=n-a-b&&k<=9;k++) {
            		c=k;
            		if (n-a-b-c < 0) {
            			break;
            		}
            		
            		for (int l=0;l<=n-a-b-c&&l<=9;l++) {
            			d=l;
            			if (n==a+b+c+d) {
            				cout << a << b << c << d <<(a+b+c+d)<<endl;
            				count++;
            			}
            			if (n-a-b-c-d < 0) {
            			break;
            		}
            		}
            	}
            }
      }
      }
      cout << count;
      return 0;
}

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

int main()
{
	int n[100];
	int i=0;
	while(cin >> n[i]){i++;};
	int s=0;
	for(int j=0;j<i;j++){
		int s=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[j]){s=s+1;}
				}
			}
		}
	}
	cout << s << endl;
	}
    return 0;
}

C++: #include <iostream>

using namespace std;

int calc(int a, int b, int n) {
	int tmp = n-a-b;
	int count = 0;
	for (int c=0; c<10; c++) {
		for (int d=0; d<10; d++) {
			if (tmp == c+d)
				count++;
		}
	}
	return count;
}

void solve(int n) {
	int count = 0;
	for (int a=0; a<10; a++) {
		for (int b=0; b<10; b++) {
			count += calc(a,b,n);
		}
	}
	cout << count << endl;
}

int main() {
	int n;
	while (cin >> n) {
		solve(n);
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;

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

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

C++: #include<iostream>
using namespace std;
#define RENT 100000
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;
    }
}