Go: package main

import (
	"fmt"
)

func main() {
	for {
		var a int
		fmt.Scan(&a)
		if a == 0 {
			break
		}
		rs := 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 {
							rs++
						}
					}
				}
			}
		}
		fmt.Println(rs)
	}
}

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

using namespace std;

int main() {
  int n, count;
  while(!feof(stdin)) {
    scanf("%d",&n);
    if(feof(stdin))break;
    count=0;
    if(n == EOF) break;
    for(int i=0;i<10;i++) {
      for(int j=0;j<10;j++) {
	for(int k=0;k<10;k++) {
	  if(i+j+k>=n-9 && i+j+k<=n)count++;
	}
      }
    }
    printf("%d\n", count);
  }
}

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

int combination(int n){
  int temp = 0;
  for(int i = 0;i < 10;i++)
    for(int j = 0;j < 10;j++)
      for(int k = 0;k < 10;k++)
	if((n - i - j - k) >= 0 && (n -i -j -k) <10)
	  temp++;
  return temp;
}


int main(){
  int n;
  while(cin >> n){
    cout << combination(n) << endl;
  }
}

C++: #include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <string>
#include <istream>
 
#define INPUT_FROM_FILE (0)
#if INPUT_FROM_FILE
#include <fstream>
#endif


 int main(int argc, char **argv){
	int n = 0;
	std::string buf;
 
#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
#endif
 
 
#if INPUT_FROM_FILE
	while(std::getline(ifs, buf)){
#else
	while(std::getline(std::cin, buf)){
#endif
		int count = 0;
		n = std::atoi(buf.c_str());

		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){
							count++;
						}
					}
				}
			}
		}
		std::cout << count << std::endl;
	}
    return 0;
}

C++: #include <stdio.h>
 
using namespace std;
 
 
int main(){
    int n,count;
    while(scanf("%d",&n)!=EOF){
        if(n >= 37){
            printf("0\n");
        }else{
            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++;
                        }
                    }
                }
            }
            printf("%d\n",count);
        }
    }
 
    return 0;
}

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

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

C++: #define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include<iomanip>
#include<vector>
#include<cmath>
#include <algorithm>

using namespace std;


int main()
{
	int n, counter = 0;
		while (scanf("%d", &n) == -1){
		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>
using namespace std;
int main()
{
	int n;
	int i, j, k, t;
	int cnt=0;
	//cin >> n;
	while (cin >> n)
	{
		cnt = 0;
		for (i = 0; i <= 9; i++)
		{
			for (j = 0; j <= 9; j++)
			{
				for (k = 0; k <= 9; k++)
				{
					for (t = 0; t <= 9; t++)
					{
						if (i + j + k + t == n)
						{
							cnt++;
						}
					}
				}
			}
		}
		cout << cnt << endl;
		//cin >> n;
	}
	return 0;
}

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

int AgreementCountAnswer(int n)
{
	int AgreementCount = 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) AgreementCount++;
				}
			}
		}
	}
	return AgreementCount;
}

int main()
{
	while(true){
		int n;
		cin >> n;
		if(cin.eof() == true) break;
		cout << AgreementCountAnswer(n) << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>

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 <string>
#include <algorithm>
using namespace std;

int main()
{
    int in=0;
    
    while(cin >> in){
        
        int cnt=0;
        
        for (int n=0; n<10; n++) {
            for (int o=0; o<10; o++) {
                for (int p=0; p<10; p++) {
                    for (int q=0; q<10; q++) {
                        if(in == n+o+p+q) cnt++;
                    }
                }
            }
        }
        
        cout << cnt << endl;
    }
}

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

using namespace std;


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

	while(cin >> n){
		for(int i=0;i<10;i++){
			for(int j=0;j<10;j++){
				for(int x=0;x<10;x++){
					for(int y=0;y<10;y++){
						if(i+j+x+y == n)ans++;
					}
				}
			}
		}
		printf("%d\n",ans);
		ans = 0;
	}

	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int n;
  while(scanf("%d",&n)!= EOF){
    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;

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

    while (cin >> n) {
        count = 0;
        for (a = 0; a <= 9; a++) {
            for (b = 0; b <= 9; b++) {
                for (c = 0; c <= 9; c++) {
                    for (d = 0; d <= 9; d++) {
                        if (a + b + c + d == n) {
                            count++;
                        }
                    }
                }
            }
        }
        cout << count << endl;

    }
    return 0;
}

C++: #include <iostream>

int main()
{
    while (true) {
        int n;
        std::cin >> n;
        if (std::cin.eof()) break;

        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;
        std::cout << cnt << std::endl;
    }
}

C++: #include <iostream>

using namespace std;

int main() {
    int n;
    while (true) {
        int count = 0;
        cin >> n;
        for (int i=0; i<10; i++) {
            for (int j=0; j<10; j++) {
                for (int k=0; k<10; k++) {
                    int d = n-i-j-k;
                    if (0 <= d && d < 10) {
                        count++;
                    }
                }
            }
        }
        cout << count << endl;
        if (cin.eof()) {
            return 0;
        }
    }
}

C++: #include<iostream>
using namespace std;
int main(){
int n;
while(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++){
if(0<=n-a-b-c && n-a-b-c<=9){
counter++;
}
}
}
}
cout<<counter<<endl;
}
return 0;
}