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 <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <list>
#include <iostream>
#include <sstream>
#include <climits>
#include <cfloat>
#include <complex>

using namespace std;

int main()
{
	int n;
	while (scanf("%d", &n), n)
	{
		int visit[7];
		memset(visit, 0, sizeof(visit));
		while (n--)
		{
			int t;
			scanf("%d", &t);
			++visit[t/10 >= 6 ? 6 : t/10];
		}
		for (int i = 0; i < 7; ++i)
			printf("%d\n", visit[i]);
	}

	return 0;
}

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

int main()
{
    int n, d, a[13];

    while( cin >> n )
    {
        if( n == 0 )
            break;

        for( int i = 0; i < 13; i++ )
            a[i] = 0;

        for( int i = 0; i < n; i++ )
        {
            cin >> d;
            a[d/10]++;
        }

        for( int i = 0; i < 6; i++ )
            cout << a[i] << endl;

        int sum = 0;
        for( int i = 6; i < 13; i++ )
            sum += a[i];
            
        cout << sum << endl;
    }
    return 0;
}

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

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int n;
  while (cin >> n, n) {
    int cnt[7] = {};
    for (int i = 0; i < n; i++) {
      int a;
      cin >> a;
      if (a >= 60) cnt[6]++;
      else cnt[a / 10]++;
    }
    for (int i = 0; i < 7; i++) {
      cout << cnt[i] << endl;
    }
  }

  return 0;
}