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() {
    int n;
    while (cin >> n) {
        if (n == 0) break;
        int ys[7];
        for (int i = 0; i < 7; i++) ys[i] = 0;
        for (int i = 0; i < n; i++) {
            int y; cin >> y;
            if (0  <= y && y <=  9) ys[0]++;
            if (10 <= y && y <= 19) ys[1]++;
            if (20 <= y && y <= 29) ys[2]++;
            if (30 <= y && y <= 39) ys[3]++;
            if (40 <= y && y <= 49) ys[4]++;
            if (50 <= y && y <= 59) ys[5]++;
            if (60 <= y)            ys[6]++;
        }
        for (int i = 0; i < 7; i++) {
            cout << ys[i] << endl;
        }
    }
    return 0;
}

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

int main() {
	while(1){
		long n; long a[10]={0};
		cin >> n ; if(!n) break;
		for(int i=0;i<n;i++){
			int age; cin >> age ;
			age/=10;
			if(age>=6) a[6]++; else a[age]++;
		}
		for(int i=0;i<=6;i++) cout << a[i] << '\n';
	}
}

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

int main() {
  int a[7];
  int n, t, b;
  while (1) {
    cin >> n;
    if (!n) break;
    for (int i=0; i<7; i++) {
      a[i] = 0;
    }
    for (int i=0; i<n; i++) {
      cin >> t;
      b = t / 10;
      if (b > 6) {
        b = 6;
      }
      ++a[b];
    }
    for (int i=0; i<7; i++) {
      cout << a[i] << endl;
    }
  }
  return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<cstring>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
#define all(n) n.begin(),n.end()

const int MAX = 7;

int main()
{
    int n;
    while(cin >> n && n)
    {
        int num[MAX] = {};
        int t = 0;

        REP(n)
        {
            cin >> t;
            if(t > 59){ num[6]++; continue;}
            num[t / 10]++;
        }

        REP(MAX) cout << num[i] << endl;
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

int main() {

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

    int a[7] = {0};
  
    for(int i=0;i<n;i++) {

      cin >> t;

      if(t < 10) a[0]++;
      else if(t < 20) a[1]++;
      else if(t < 30) a[2]++;
      else if(t < 40) a[3]++;
      else if(t < 50) a[4]++;
      else if(t < 60) a[5]++;
      else a[6]++;

    }

    for(int i=0;i<7;i++) {

      cout << a[i] << endl;

    }


  }

  return 0;

}

C++: #include<cstdio>
#include<iostream>
#include<algorithm>

using namespace std;

void Euclidean(long long a,long long b,long long n){
	if(b!=0) Euclidean(b,a%b,n+1);
	else cout<<a<<" "<<n<<endl;
	return;
}

int main(void){

	int people[7];
	int n;
	int inp;

	while(1){
		for(int i=0;i<7;i++) people[i]=0;
		cin>>n;
		if(n==0) break;
		for(int i=0;i<n;i++){
			cin>>inp;
			if(inp<60) people[inp/10]++;
			else people[6]++;
		}
		for(int i=0;i<7;i++) cout<<people[i]<<endl;
	}

    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
using namespace std;

const int INF = 1e9;
typedef long long ll;

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

C++: #include<bits/stdc++.h>
using namespace std;

int main()
{
  int n;
  int cnt[7];

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

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

}

C++: #include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
#include <string>
#include <complex>
#include <functional>
using namespace std;
typedef pair<int,int> P;
       int cnt[7];
int main(){
    int i,n,p;
    while(cin>>n&&n){
for(i=0;i<7;i++) cnt[7]=0;
        for(i=0;i<n;i++){
            cin>>p;
            if(p<10) cnt[0]++;
            else if(p<20) cnt[1]++;
            else if(p<30) cnt[2]++;
            else if(p<40) cnt[3]++;
            else if(p<50) cnt[4]++;
            else if(p<60) cnt[5]++;
            else cnt[6]++;
        }
        for(i=0;i<7;i++) cout<<cnt[i]<<endl;
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	long n,p;
	long age[7];
	while(cin >> n){
		if(n == 0) return 0;
		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>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int main(){
	while(1){
		int num,age,table[7]={0};
		cin>>num;
		if(num==0) break;

		for(int i=0;i<num;i++){
			cin>>age;
			if(0<=age && age<=9) table[0]++;
			else if(10<=age && age<=19) table[1]++;
			else if(20<=age && age<=29) table[2]++;
			else if(30<=age && age<=39) table[3]++;
			else if(40<=age && age<=49) table[4]++;
			else if(50<=age && age<=59) table[5]++;
			else if(60<=age) table[6]++;
		}

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

	}
	return 0;
}