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
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main() {
  int n, old;

  while(1) {
    cin >> n;
    if(!n) break;
    int a[7] = {0};
    REP(i, n) {
      cin >> old;
      if(0 <= old && old < 10) a[0]++;
      else if(10 <= old && old < 20) a[1]++;
      else if(20 <= old && old < 30) a[2]++;
      else if(30 <= old && old < 40) a[3]++;
      else if(40 <= old && old < 50) a[4]++;
      else if(50 <= old && old < 60) a[5]++;
      else a[6]++;
    }

    REP(i, 7) {
      cout << a[i] << endl;
    }
  }
}

C++: // 2011/01/15 Tazoe

#include <iostream>
using namespace std;

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

		int gen[7];
		for(int i=0; i<7; i++)
			gen[i] = 0;

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

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

	return 0;
}

C++: #include <iostream>
using namespace std;
#define rep2(x,from,to) for(int x=(from);x<(to);++(x))
#define rep(x,to) rep2(x,0,to)
int main(){
	int n, a;
	while(cin >> n, n) {
		int ret[7] = {};
		rep(i,n) {
			cin >> a;
			ret[a/10 >= 7 ? 6 : a/10]++;	
		}
		rep(i,7) {
			cout << ret[i] << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<cstring>
using namespace std;
int a[7]; int n, p;
int main() {
	while (true) {
		memset(a, 0, sizeof(a));
		cin >> n;
		if (n == 0) { break; }
		for (int i = 0; i < n; i++) {
			cin >> p;
			p /= 10;
			if (p > 6) { p = 6; }
			a[p]++;
		}
		for (int i = 0; i < 7; i++) {
			cout << a[i] << endl;
		}
	}
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
 
using namespace std;
 
#define pb(n)	push_back(n)
#define mk(n,m) make_pair(n,m)
#define fi 	first
#define se 	second
#define all(r) r.begin(),r.end()

#define rep(i,n) for(int i=0; i<(n); i++)
#define repc(i,a,b) for(int i=(a); i<=(b); i++)

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
 
const int IMAX=((1<<30)-1)*2+1;
const double EPS=1e-9;
//int mod=1000000007;





int main(){
	int n;
	int a;
	while(cin>>n&&n>0){
		vi v(7,0);
		rep(i,n){
			cin>>a;
			int b=0;
			for(int i=0; i<7; i++){
				b+=10;
				if(a<b){
					v[i]++;
					break;
				}
				if(i==6)v[i]++;
			}
		}
		for(int i=0; i<7; i++){
			cout<<v[i]<<endl;
		}
	}
}

C++: #include <iostream>

using namespace std;

int main()
{
    int n;
    int old;
    int num[7];

    while (cin >> n) {
        if (!n)
            break;

        for (int i = 0; i < 7; i++)
            num[i] = 0;

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

            for (int j = 60; j >= 0; j -= 10)
                if (old >= j) {
                    num[j / 10]++;
                    break;
                }
        }
    
        for (int i = 0; i < 7; i++) 
            cout << num[i] << endl;
    }

    return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
	int year[10]={},n,f,num;
	while(cin>>n,n!=0){
		for(int i=0;i<10;i++)year[i]=0;
		for(int i=0;i<n;i++){
			cin>>num;
			num++;
			f=0;
			while(num>11){
				f++;
				num-=10;
			}
			if(f>6)year[6]++;
			else year[f]++;
		}
		for(int i=0;i<7;i++)cout<<year[i]<<endl;
	}
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int n, a, p[7];
int main() {
	while (true) {
		scanf("%d", &n);
		if (n == 0) break;
		for (int i = 0; i < 7; i++) p[i] = 0;
		for (int i = 0; i < n; i++) scanf("%d", &a), p[a < 60 ? a / 10: 6]++;
		for (int i = 0; i < 7; i++) printf("%d\n", p[i]);
	}
	return 0;
}

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

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<cstring>
using namespace std;
int main(){

	int n;
	while(1){
        scanf("%d",&n);
        if(n == 0) break;
        int kubun[10] = {0};
        for(int i = 0; i < n; i++){
            int x;
            scanf("%d",&x);
            if(x < 10) kubun[0]++;
            if(x >= 10 && x < 20) kubun[1]++;
            if(x >= 20 && x < 30) kubun[2]++;
            if(x >= 30 && x < 40) kubun[3]++;
            if(x >= 40 && x < 50) kubun[4]++;
            if(x >= 50 && x < 60) kubun[5]++;
            if(x >= 60) kubun[6]++;
        }
        for(int i = 0; i < 7; i++){
            printf("%d\n",kubun[i]);
        }
	}

	return 0;
}