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 <stdio.h>

int main(void) {

  int n;
  int age;

  int gen[10];

  int i;


  while(1) {

    scanf("%d",&n);

    if(n==0) break;

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

    for(i=0;i<n;i++) {

      scanf("%d",&age);

      if(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 gen[6]++;

    }

    for(i=0;i<7;i++) printf("%d\n",gen[i]);

  }

  return 0;

}

C++: #include<stdio.h>
int main(void)
{
	int a,b,c,d,e,f,g;
	int n;
	int i;
	int m;
	a=b=c=d=e=f=g=0;

	scanf("%d",&n);
	while(n!=0){
		for(i=0;i<n;i++){
			scanf("%d",&m);
			if(m<10){
				a++;
			}
			else if(m<20){
				b++;
			}
			else if(m<30){
				c++;
			}
			else if(m<40){
				d++;
			}
			else if(m<50){
				e++;
			}
			else if(m<60){
				f++;
			}
			else if(m>=60){
				g++;
			}
		}
	printf("%d\n%d\n%d\n%d\n%d\n%d\n%d\n",a,b,c,d,e,f,g);
	scanf("%d",&n);
	}
	
	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, 7> arr{{}};

        while (n--) {
            std::cin >> age;
            age < 70 ? ++arr[age / 10] : ++arr[6];
        }
        
        for (const auto& cnt : arr) {
            std::cout << cnt << '\n';
        }
    }

    return 0;
}

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

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

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

C++: #include <map>
#include <set>
#include <list>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdio>
#include <string>
#include <vector>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <functional>

#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define repi(i,a,b) for(int i = (a); i < (b); i++)

using namespace std;

typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;

const int INF=1<<29;
const double EPS=1e-9;

const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};
int n;
int main(){
	while(cin>>n,n){
		int a[10]={0};
		rep(i,n){
			int x;
			cin>>x;
			x /=10;
			if(x>=6){
				a[6]++;
			}else{
				a[x]++;
			}
		}
		rep(i,7){
			cout <<a[i]<<endl;
		}
	}
	return 0;
}

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

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

    long long int n;
    std::array<long long int, 7> arr;
    int age;

    while (std::cin >> n, n) {
        arr.fill(0);
        for (; n--;) {
            std::cin >> age;
            age = (age > 69 ? 60 : age);
            ++arr[age / 10];
        }
    
        for (const auto& cnt : arr) {
            std::cout << cnt << std::endl;
        }
    }

    return 0;
}

C++: #include<iostream>
using namespace std;
int t[7],n,a;
int main(){
  while(cin>>n&&n){

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

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

      for(int j=0;j<7;j++){
	if(j*10<=a&&a<=j*10+9){
	  t[j]++;
	  break;
	}
	if(j==6)t[6]++;
      }

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

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

C++: #include <iostream>
using namespace std;
main() {
	for(int n,p[7]={},a,i;cin>>n,n;){
		for(i=n;i--;)cin>>a,p[(a/10)<=5?a/10:6]++;
		for(i=0;i<7;p[i]=0,++i)cout<<p[i]<<endl;
	}
}

C++: #include <iostream>
int main() {int n, x;while(std::cin>>n,n){int dat[7]={};for(int i=0;i<n;i++){cin>>x;if(x/10>6)x=60;dat[x/10]++;}for(int i=0;i<7;i++)std::cout<<dat[i]<<'\n';}}

C++: #include <iostream>

using namespace std;

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

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  int n;
  while (cin >> n, n) {
    vi v(7);
    while (n--) {
      int a;
      cin >> a;
      v[0] += a < 10;
      v[1] += 10 <= a && a < 20;
      v[2] += 20 <= a && a < 30;
      v[3] += 30 <= a && a < 40;
      v[4] += 40 <= a && a < 50;
      v[5] += 50 <= a && a < 60;
      v[6] += 60 <= a;
    }
    for (auto &x : v) cout << x << endl;
  }
}

C++: #include<stdio.h>

int main(){
int n[8]={};
int N,x;

while(1){
scanf("%d",&N);if(N==0)break;

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

}
return 0;
}

C++: #include <iostream>
using namespace std;
 
int main(){
	int n,t;
	while(cin >> n && n){
		int p[7]={0};
		for(int i=0;i<n;i++){
			cin >> t;
			if(t>60)t=60;
			p[t/10]++;
		}
		for(int i=0;i<7;i++){
			cout << p[i] << endl;
		}
	}
}