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>
#include <array>

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

    long long int n;

    std::array<int, 130> age2generation;

    int i;
    for (i = 0; i < 10; ++i) {
        age2generation[i] = 0;
    }
    for (i = 10; i < 20; ++i) {
        age2generation[i] = 1;
    }
    for (i = 20; i < 30; ++i) {
        age2generation[i] = 2;
    }
    for (i = 30; i < 40; ++i) {
        age2generation[i] = 3;
    }
    for (i = 40; i < 50; ++i) {
        age2generation[i] = 4;
    }
    for (i = 50; i < 60; ++i) {
        age2generation[i] = 5;
    }
    for (int i = 60; i < 130; ++i) {
        age2generation[i] = 6;
    }

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

        for (; n--;) {
            std::cin >> age;
            ++arr[age2generation[age]];
        }
        
        for (const auto& cnt : arr) {
            std::cout << cnt << std::endl;
        }
    }

    return 0;
}

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];
		rep(i,n){
			cin>>a;
			int b=10;
			for(int i=0; i<7; i++){
				if(a<b){
					v[i]++;
					break;
				}
				b+=10;
			}
		}
		for(int i=0; i<7; i++){
			cout<<v[i]<<endl;
		}
	}
}

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

C++: #include <iostream>

using namespace std;

int main() {
	int n;
	while (cin >> n) {
		if (n == 0) {
			break;
		}
		int age[7] = {0};
		int ag[] = {10, 20, 30, 40, 50, 60};
		int a;
		for (int i = 0; i < n; i++) {
			cin >> a;
			for (int i = 0; i < 7; i++) {
				if (i == 6) {
					age[6]++;
				} else {
					if (a < ag[i]) {
						age[i]++;
						break;
					}
				}
			}
		}
		for (int i = 0; i < 7; i++) {
			cout << age[i] << endl;
		}
	}
	return 0;
}

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


int main(void){
  int cnt[7], n;
  
  while (cin >> n){
    if (n==0) break;
    int age;
    for (int i=0; i<7; i++) cnt[i] = 0;
    for (int i=0; i<n; i++){
      cin >> age;
      age/=10;
      cnt[age<6?age:6]++;
    }
    for (int i=0; i<7; i++) cout << cnt[i] << endl;
  }
  return 0;
}

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

int main(){
	int n, age;
	int ans[7];
	while(cin >> n, n){
		for(int i=0; i < 7; i++) ans[i] = 0;
		for(int i=0; i < n; i++){
			cin >> age;
			if(age < 10) ans[0]++;
			else if(age < 20) ans[1]++;
			else if(age < 30) ans[2]++;
			else if(age < 40) ans[3]++;
			else if(age < 50) ans[4]++;
			else if(age < 60) ans[5]++;
			else ans[6]++;
		}
		for(int i=0; i < 7; i++)cout << ans[i] << endl;
	}
}

C++: 
#include<iostream>
#include<fstream>
#include<sstream>
#include<cstdio>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<algorithm>
#include<cmath>
#include<string>
#include<cstring>
#include<cstdlib>
#include<climits>
#include<utility>
#include<cctype>
using namespace std;

#define ull unsigned long long
#define stt(it,order) sort(it.begin(),it.end(),order)
#define STT(it,n,order) sort(it,it+n,order)
#define st(it) sort(it.begin(),it.end())
#define ST(it,n) sort(it,it+n)
#define ll long long
#define rep(i,j) for(int i=0;i<j;++i)
#define loop(i,a,j) for(int i=a;i<j;++i)
#define mpi(it,table,T,E) for(map<T,E>::iterator it = table.begin();it!=table.end();++it)
#define PI 3.141592654
#define pb(v,e) v.push_back(e)
#define ms(a,v) memset(a,v,sizeof(a))
#define cp(a,b,n) rep(i,n)a[i] = b[i]
#define pi(a) printf("%d\n",a)
#define ps(a) printf("%s\n",a)
#define si(a) scanf("%d",&a)
#define print_int_matrix(mat,n) rep(i,n-1){printf("%d ",mat[i]);}printf("%d\n",mat[n-1]);
#define print_string_matrix(mat,n) rep(i,n-1){printf("%s ",mat[i]);}printf("%s\n",mat[n-1]);
#define mkp(a,b) make_pair(a,b)
#define fnd(table,e) (find(table.begin(),table.end(),e) != table.end())

//TYPOS DE DATOS PERSONALES
typedef unsigned int _set;
typedef unsigned long _lset;
typedef pair<int,int> pii;

string sint(int i){
   stringstream buf;
   buf<<i;
   return buf.str();
}

/*
ifstream fin("input.txt");
ofstream fout("output.txt");
#define cin fin
#define cout fout
*/

int dx[] = {-1,0,0,1};
int dy[] = {0,-1,1,0};
int dx8[] = {-1,-1,-1,0,0,1,1,1};
int dy8[] = {-1,0,1,-1,1,-1,0,1};


int main(){
   int n;
   while( si(n) != EOF , n){
      map<int,int> table;
      table[0] = 0;
      table[1] = 0;
      table[2] = 0;
      table[3] = 0;
      table[4] = 0;
      table[5] = 0;
      table[6] = 0;
      rep(i,n){
         int j;
         si(j);
         if( j >= 60){
            table[6]++;
         }else if(50 <= j && j < 60){
            table[5] ++;
         }else if(40 <= j && j < 50){
            table[4]++;
         }else if(30 <= j && j < 40){
            table[3]++;
         }else if(20 <= j && j < 30){
            table[2]++;
         }else if(10 <= j && j < 20){
            table[1]++;
         }else{
            table[0]++;
         }
      }

      mpi(it,table,int,int){
         printf("%d\n",it->second);
      }

   }
   return 0;
}

C++: #include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
typedef complex<double> P;
const int L = 7;

int main() {
  int N, n;
  while(cin >>N && N){
    int cnt[L];
    memset(cnt, 0, sizeof(cnt));
    REP(i, N){
      cin >>n;
      REP(j, L - 1) if(10 * j <= n && 10 * j + 9 >= n) cnt[j]++;
      if(n >= 60) cnt[6]++;
    }
    REP(i, L) cout <<cnt[i] <<endl;
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){
	int n;
	
	while(cin >> n && n){
		int num[7] = {0};
		int tmp;
		for(int i=0;i<n;i++){
			cin >> tmp;
			if(tmp >= 60){
				num[6]++;
			}else{
				num[tmp/10]++;
			}
		}
		for(int i=0;i<7;i++){
			cout << num[i] << endl;
		}
	}
}