Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		count := 0
		for i := 9; i >= 0; i-- {
			numCpy, _ := strconv.Atoi(scanner.Text())
			if numCpy-i >= 0 {
				for j := 9; j >= 0; j-- {
					numCpyi := numCpy - i
					if numCpyi-j >= 0 {
						for k := 9; k >= 0; k-- {
							numCpyj := numCpyi - j
							if numCpyj-k >= 0 {
								for l := 9; l >= 0; l-- {
									numCpyk := numCpyj - k
									if numCpyk-l == 0 {
										count++
										break
									}
								}
							}
						}
					}
				}
			}
		}
		fmt.Println(count)
	}

}

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

#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false

int main()
{
    int n;
    int i, j, k;
    int ans = 0;
    while (cin >> n)
    {
        ans = 0;
        i = 0;
        j = 0;
        k = 0;
        rep(i, 10)
        {
            rep(j, 10)
            {
                rep(k, 10)
                {
                    if (0 <= n - i - j - k && n - i - j - k <= 9)
                    {
                        ans++;
                    }
                }
            }
        }
        cout << ans << endl;
    }
}

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

int main() {
  while (!cin.eof()) {
    int n, a, b, c, d, cnt = 0;
    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 (a + b + c + d == n)
	      cnt++;
    cout << cnt << endl;
  }
}

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

const double interest = 0.05;
const int roundYen = 1000;

int weeklyAdd(int debt) {
  debt = debt * (1 + interest);
  debt = ceil(debt / roundYen) * roundYen;
  std::cout << debt << '\n';
  return debt;
}

int main(int argc, char const *argv[]) {
  // int week = 5;
  int week;
  std::cin >> week;
  int debt = 100000;

  for (size_t i = 0; i < week; i++) {
    debt = weeklyAdd(debt);
  }

  return 0;
}

C++: #include <stdio.h>

int main( void ){
    int nCount = 0;
    int n;
    while( true ){
    scanf( "%d",&n );
    if( n == NULL ) break;

    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 ) nCount++;
                }
            }
       }
    }

    printf( "%d\n",nCount );
    }
    return 0;
}

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



int main(void){	

	int n,count;
	while (cin >> n){
		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 l = 0; l < 10; l++){

						if (i + j + k + l == n){
							count++;
						}

					}
				}
			}
		}cout << count << endl;
	

	}
	
	return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
    int n,i,j,k,l,ans = 0;

    while(cin >> n){

        for(i = 0;i <= 9;i++){
            for(j = 0;j <= 9;j++){
                for(k = 0;k <= 9;k++){
                    for(l = 0;l <= 9;l++){
                        if(n == i + j + k + l){
                            ans++;
                        }
                    }
                }
            }
        }
        
        cout << ans << endl;
    }
    
    return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
	for(;;){
		int s,f = 0;
		if(scanf("%d",&s) == EOF){break;}
		for(int i=0; i<10; i++) for(int l=0; l<10; l++) for(int m=0; m<10; m++) for(int n=0; n<10; n++) if(i+l+m+n == s){f++;}
		cout <<f<<endl;
	}
	return 0;
}

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

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++) {
                    for (int d = 0; d < 10; d++) {
                        if (a + b + c + d == N) {
                            count++;
                        }
                    }
                }
            }
        }
        cout << count << endl;
    }
    return 0;
}

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

int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);

  int i, j, k, l, sum, count = 0;

  cin >> sum;
  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 == sum) { count += 1; }
        }
      }
    }
  }

  cout << count << endl;

  return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int input;
	cin >> input;
	
	short count = 0;
	int i, j, k, l;
	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 == input)	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;
	while(cin >> n){
	int t = 0;
	for (int a = 0; a < 10; ++a)
	{
		for (int b = 0; b < 10; ++b)
		{
			for (int c = 0; c < 10; ++c)
			{
				if(n - (a + b + c ) <= 9 && 0 <= n - (a + b + c )){
					t++;
				}
			}
		}
	}
	cout << t << endl;
}
	return 0;
}

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

void test();
int sum_comb(int n);

using namespace std;

int main(void)
{
	test();
	return 0;
}

void test()
{
	int n,comb;

	while (cin >> n)
	{
		comb = sum_comb(n);

		cout << comb << endl;
	}
}

int sum_comb(int n)
{
	int a, b, c, d,cnt;
	cnt = 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)
						cnt++;
				}
			}
		}
	}
	return cnt;
}

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

using namespace std;

int main(void)
{

	int val,count = 0;
	while (scanf_s("%d", &val) != EOF)
	{
		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 == val)count++;

					}

				}


			}


		}

		printf("%d\n", count);
		count = 0;

	}

}

C++: #include<iostream>
using namespace std;
 
int main()
{
int n,combo=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)
combo++;

cout<<combo<<endl;
}

return 0;
}

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

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