Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		n, _ := strconv.Atoi(scanner.Text())
		if n == 0 {
			break
		}
		ans := make([]int, 7)
		for i := 0; i < n; i++ {
			scanner.Scan()
			a, _ := strconv.Atoi(scanner.Text())
			switch {
			case a < 10:
				ans[0]++
			case 10 <= a && a < 20:
				ans[1]++
			case 20 <= a && a < 30:
				ans[2]++
			case 30 <= a && a < 40:
				ans[3]++
			case 40 <= a && a < 50:
				ans[4]++
			case 50 <= a && a < 60:
				ans[5]++
			case 60 <= a:
				ans[6]++
			}
		}
		for i := range ans {
			fmt.Println(ans[i])
		}
	}
}

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

int main(void){
   long int n;
   long int one=0,ten=0,twenty=0,thirteen=0,forty=0,fifty=0,sixty=0;
   
   cin >> n;
   for(int i=0;i<n;i++){
      int old;
      cin >> old;
      if(old < 10){
	 one++;
      }
      else if(10<=old and old<20){
	 ten++;
      }
      else if(20<=old and old<30){
	 twenty++;
      }
      else if(30<=old and old<40){
	 thirteen++;
      }
      else if(40<=old and old<50){
	 forty++;
      }
      else if(50<=old and old<60){
	 fifty++;
      }
      else{
	 sixty++;
      }
   }
   

   cout << one << endl;
   cout << ten << endl;
   cout << twenty << endl;
   cout << thirteen << endl;
   cout << forty << endl;
   cout << fifty << endl;
   cout << sixty << endl;
   
   return 0;
}

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

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

    long int n;

    while (std::cin >> n, n) {
        long int age;
        std::array<long int, 13> arr{{}};

        while (n--) {
            std::cin >> age;
            ++arr[age / 10];
        }
        std::cout << arr[0] << '\n'
                  << arr[1] << '\n'
                  << arr[2] << '\n'
                  << arr[3] << '\n'
                  << arr[4] << '\n'
                  << arr[5] << '\n'
                  << arr[6] + arr[7] + arr[8]
                   + arr[9] + arr[10] + arr[11]
                   + arr [12] << '\n';
    }

    return 0;
}

C++: using System;

class Program {
    static void Main() {
        for (string line; (line = Console.ReadLine()) != "0";) {
            var n = int.Parse(line);
            var ages = new int[7];

            for (var i = 0; i < n; i++) {
                var age = int.Parse(Console.ReadLine());
                ages[age >= 60 ? 6 : (age / 10)] ++;
            }

            foreach (var count in ages) {
                Console.WriteLine(count);
            }
        }
    }
}

C++: #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <complex>
#include <iterator>
#include <array>
#include <memory>
#include <stack>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double,double>pdd;
typedef pair<ll,ll>pll;
int main(){
    int n;
    while(cin>>n,n){
        vi v(7,0);
        rep(i,n){
            int gotiusa_is_a_god_especially_tiya;
            cin>>gotiusa_is_a_god_especially_tiya;
            if(gotiusa_is_a_god_especially_tiya>=60)gotiusa_is_a_god_especially_tiya=60;
            v[gotiusa_is_a_god_especially_tiya/10]++;
        }
        rep(i,7)cout<<v[i]<<endl;
    }
}

C++: // Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		int n;
		cin >> n;

		if(n==0)
			break;

		int cnt[7] = {0};

		for(int i=0; i<n; i++){
			int age;
			cin >> age;

			if(age>=0&&age<10){
				cnt[0]++;
			}
			else if(age>=10&&age<20){
				cnt[1]++;
			}
			else if(age>=20&&age<30){
				cnt[2]++;
			}
			else if(age>=30&&age<40){
				cnt[3]++;
			}
			else if(age>=40&&age<50){
				cnt[4]++;
			}
			else if(age>=50&&age<60){
				cnt[5]++;
			}
			else if(age>=60){
				cnt[6]++;
			}
		}

		for(int i=0; i<7; i++){
			cout << cnt[i] << endl;
		}
	}

	return 0;
}

C++: #include <iostream>

int getIndex(int age)
{
	if (age<10) return 0;
	else if (age<20) return 1;
	else if (age<30) return 2;
	else if (age<40) return 3;
	else if (age<50) return 4;
	else if (age<60) return 5;
	else return 6;
}

int main()
{
	int n;
	while (true) {
		std::cin >> n;
		if (n == 0) break;
		int a[7] = {0,0,0,0,0,0,0};
		for (int i=0; i<n; i++) {
			int age;
			std::cin >> age;
			a[getIndex(age)]++;
		}
		for (int i=0; i<7; i++) std::cout << a[i] << std::endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n,tmp,ans[7];
	while(true){
		cin >> n;
		if(!n)
			return 0;
		for(int i=0; i<7; i++)
			ans[i] = 0;
		for(int i=0; i<n; i++){
			cin >> tmp;
			tmp = (int)(tmp/10);
			if(tmp>6)
				tmp = 6;
			ans[tmp]++;
		}
		for(int i=0; i<7; i++)
			cout << ans[i] << endl;
	}
}

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

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

    long long int n;

    while (std::cin >> n, n) {
        std::array<long long int, 7> arr{{}};
        int age;
        for (; n--;) {
            std::cin >> age;
            age = (age < 70 ? age : 60);
            ++arr[age / 10];
        }

        for (const auto& cnt : arr) {
            std::cout << cnt << std::endl;
        }
    }

    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
long n,a,b[7],i;
while(cin>>n){
if(n==0)break;
for(i=0;i<7;i++)b[i]=0;
for(i=0;i<n;i++){
cin>>a;
if(a<10)b[0]++;
else if(a<20)b[1]++;
else if(a<30)b[2]++;
else if(a<40)b[3]++;
else if(a<50)b[4]++;
else if(a<60)b[5]++;
else b[6]++;
}

for(i=0;i<7;i++)cout<<b[i]<<endl;
}
return 0;
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main()
{
	int n,a[7],c;
	while(scanf("%d",&n),n)
	{
		fill(a,a+7,0);
		while(n--)scanf("%d",&c),a[min(c/10,6)]++;
		for(c=0;c<7;++c)printf("%d\n",a[c]);
	}
	return 0;
}

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

int n;
int p[7];

int main()
{
	cin >> n;

	while (n) {
		memset(p, 0, sizeof(p));

		for (int i = 0; i < n; i++) {
			int a;
			cin >> a;

			a /= 10;

			if (a > 5)
				p[6]++;
			else
				p[a]++;
		}

		for (int i = 0; i < 7; i++)
			cout << p[i] << endl;

		cin >> n;
	}

	return 0;
}

C++: // Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		int n;
		cin >> n;

		if(n==0)
			break;

		int cnt[7] = {0};

		for(int i=0; i<n; i++){
			int age;
			cin >> age;

			if(age>=0&&age<10){
				cnt[0]++;
			}
			else if(age<20){
				cnt[1]++;
			}
			else if(age<30){
				cnt[2]++;
			}
			else if(age<40){
				cnt[3]++;
			}
			else if(age<50){
				cnt[4]++;
			}
			else if(age<60){
				cnt[5]++;
			}
			else if(age>=60){
				cnt[6]++;
			}
		}

		for(int i=0; i<7; i++){
			cout << cnt[i] << endl;
		}
	}

	return 0;
}