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(void){
   long int n;
   long int one=0,ten=0,twenty=0,thirteen=0,forty=0,fifty=0,sixty=0;
   
   cin >> n;
   for(int i=0;i<n;i++){
      int old;
      cin >> old;
      if(old < 10){
	 one++;
      }
      else if(10<=old and old<20){
	 ten++;
      }
      else if(20<=old and old<30){
	 twenty++;
      }
      else if(30<=old and old<40){
	 thirteen++;
      }
      else if(40<=old and old<50){
	 forty++;
      }
      else if(50<=old and old<60){
	 fifty++;
      }
      else{
	 sixty++;
      }
   }
   
   if(n!=0){
     cout << one << endl;
     cout << ten << endl;
     cout << twenty << endl;
     cout << thirteen << endl;
     cout << forty << endl;
     cout << fifty << endl;
     cout << sixty << endl;
   }
   return 0;
}

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

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

int main()
{
	solve();
	return(0);
}

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

int main() {
    int n, age;
    while (scanf("%d",&n), n) {
        int num[7] = {};
        for (int i=0; i<n; ++i) {
            scanf("%d",&age);
            if (60 <= age) ++ num[6];
            else ++ num[age/10];
        }
        for (int i=0; i<7; ++i) {
            printf("%d\n", num[i]);
        }
    }
    return 0;
}

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

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
#define INF 1<<30

int main() {
  int n;
  while(cin >> n, n) {
    int table[7] = {0};
    REP(i,n) {
      int a;
      cin >> a;
      if (a < 60) {
        table[a/10]++;
      } else
        table[6]++;
    }
    REP(i,7)
      cout << table[i] << endl;
  }
}

C++: #include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

typedef vector<int> VI;
typedef pair<int,int> PII;
typedef long long ll;

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(a)  (a).begin(),(a).end()
#define PB push_back
#define sz size()

const double EPS = 1e-10;
const int INF = 100000000;

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

C++: #include<iostream>
using namespace std;
int main(){
	long n,p;
	long age[7];
	while(1){
		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>
using namespace std;
main(){for(int n,p[7]={},i;cin>>n,n;){for(i=n;i--;)cin>>n,p[n/10<6?n/10:6]++;for(i=0;i<7;p[i++]=0)cout<<p[i]<<endl;}}

C++: #include <stdio.h>

int main(void)
{
int data[7] = {0};
int n;
int d;

scanf("%d", &n);

for (int i = 0; i < n; i++){
scanf("%d", &d);

if (d >= 60){
data[6]++;
}
else {
data[d / 10]++;
}
}

for (int i = 0; i < 7; i++){
printf("%d\n", data[i]);
}

return (0);
}

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

int main(void)
{
  int num;
  int year;
  int old_num[7];

  while(scanf("%d",&num) != EOF)
    {
      for(int i = 0 ; i < 7 ; i++)
	{
	  old_num[i] = 0;
	}

      for(int i = 0 ; i < num ; i++)
	{
	  cin >> year;
	  if(year < 10) old_num[0]++;
	  else if(year < 20) old_num[1]++;
	  else if(year < 30) old_num[2]++;
	  else if(year < 40) old_num[3]++;
	  else if(year < 50) old_num[4]++;
	  else if(year < 60) old_num[5]++;
	  else old_num[6]++;
	}
      for(int i = 0 ; i < 7 ; i++)
	{
	  cout << old_num[i] << endl;
	}
    }
  return 0;
}

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

C++: #include<iostream>
using namespace std;
int main(){
	int n,p;
	int age[7];
	while(1){
		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++: // 2011/08/24 Tazoe

#include <iostream>
using namespace std;

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

		int cnt[7];
		for(int i=0; i<7; i++)
			cnt[i] = 0;		// 0ツづ渉可甘コツ可サ

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

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

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <map>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main()
{
	int n;
	while(cin >> n && n)
	{
		map<int,int> m;

		rep(i,n)
		{
			int temp;
			cin >> temp;

			temp /= 10;

			if(temp >= 6) m[6]++;
			else m[temp]++;
		}

		rep(i,7)
		{
			cout << m[i] << endl;	
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
    while(1)
    {
        int n;
        cin>>n;if(!n)return 0;
        int gn[7]={0};
        for(int i=0;i<n;++i){
            int a,ag=0;
            cin>>a;
            if(a>=10)ag++;
            if(a>=20)ag++;
            if(a>=30)ag++;
            if(a>=40)ag++;
            if(a>=50)ag++;
            if(a>=60)ag++;
            gn[ag]++;
        }
        for(int i=0;i<7;++i)cout<<gn[i]<<endl;
    }
    return 0;
}