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>
#define MAX 1000000
using namespace std;
int main(){
	int count=0;
	int n,p;
	int age[MAX][7];
	while(cin >> n){
		if(n == 0) break;
		for(int i=0; i<7; i++) age[count][i]=0;
		for(int i=0; i<n; i++){
			cin >> p;
			if(p < 10)
				age[count][0]++;
			if(p > 10 && p < 20)
				age[count][1]++;
			if(p > 20 && p < 30)
				age[count][2]++;
			if(p > 30 && p < 40)
				age[count][3]++;
			if(p > 40 && p < 50)
				age[count][4]++;
			if(p > 50 && p < 60)
				age[count][5]++;
			if(p >= 60)
				age[count][6]++;
		}
	count++;
	}
	for(int i=0; i<count; i++){
		for(int j=0; j<7; j++)
			cout << age[count][j] << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(void){
    int n,a,count1,count10,count20,count30,count40,count50,count60;
    count1=0;
    count10=0;
    count20=0;
    count30=0;
    count40=0;
    count50=0;
    count60=0;
    while (cin>>n) {
        if (n==0) {
            break;
        } else {
            for (int i=0;i<n;i++) {
                cin>>a;
                if (a<10) {
                    count1++;
                } else if (a>=10&&a<20) {
                    count10++;
                } else if (a>=20&&a<30) {
                    count20++;
                } else if (a>=30&&a<40) {
                    count30++;
                } else if (a>=40&&a<50) {
                    count40++;
                } else if (a>=50&&a<60) {
                    count50++;
                } else if (a>=60) {
                    count60++;
                }
            }
        }
        cout<<count1<<endl;
        cout<<count10<<endl;
        cout<<count20<<endl;
        cout<<count30<<endl;
        cout<<count40<<endl;
        cout<<count50<<endl;
        cout<<count60<<endl;
        count1=0;
        count10=0;
        count20=0;
        count30=0;
        count40=0;
        count50=0;
        count60=0;
    }
}

C++: #include <iostream>

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

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

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
	int n,a,b[7];
	while(true){
	cin>>n;
	if(n==0)
		break;
	for(int i=0;i<7;i++)
		b[i]=0;
	for(int i=0;i<n;i++){
		cin>>a;
		for(int j=0;j<6;j++){
			if(a>=j*10&&a<j*10+10)
				b[j]++;
		}
		if(a>=60)
			b[6]++;
	}
	for(int i=0;i<7;i++)
		cout<<b[i]<<endl;
	}
    return 0;
}

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

int cnt[7];

int main()
{
	int n;
	while( std::cin >> n, n )
	{
		memset( cnt, 0, sizeof( cnt ) );

		while( n-- )
		{
			int age;
			std::cin >> age;

			for( int i = 0; i != 7; ++i )
			{
				if( !i && age < 10 )
					++cnt[i];
				else if( i == 6 && age >= 60 )
					++cnt[i];
				else if( i * 10 <= age && age < ( i + 1 ) * 10 )
					++cnt[i];
			}
		}

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

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

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

int main() {
   int n,a,b[7];
   while (cin >> n && n>0) {
	  for (a=0;a<7;a++) b[a]=0; 
	  for (;n>0;n--) {
		  cin >> a;
		  if (a>59) b[6]++; else b[a/10]++;
	  }
	  for (a=0;a<7;a++) cout << b[a] << endl;
  }  
return 0;
}

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

int main()
{
	while (1) {
		int a;
		cin >> a;
		if (a == 0)break;
		vector<int>s(7);
		for (int b = 0; b < a; b++)
		{
			string c;
			cin >> c;
			if (c.length() == 1) { s[0]++; continue; }
			if (c[0] > 53) { s[6]++; continue; }
			s[c[0] - 48]++;
		}
		for (int k : s)
			cout << k << endl;
	}
}

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

int main(){
  int n,i,j,ne,age[10];
 

  while(1){
 for(i=0;i<10;i++){
    age[i]=0;
  }
    cin >> n;
    if(n == 0)break;

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



  }






}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int people[10];

int main() {
	int n;
	while(n=in()){
		memset(people,0,sizeof(people));
		for(;n--;){
			int old=in();
			if(old>=70)people[6]++;
			else people[old/10]++;
		}
		for(int i=0;i<7;i++){
			cout<<people[i]<<endl;
		}
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
  int n,b;

  while(cin >> n ,n){
    int a[7] = {0};
    while(n--){
      cin >> b;

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

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

  return 0;
}

C++: #include <iostream>
using namespace std;
int main(void)
{
	int n;
	int date[8] = {0,10,20,30,40,50,60,1000};
	while(cin>>n){
		int freq[7]={0};
		if(!n) break;
		while(n--){
			int year;
			cin >> year;
			for(int i=0;i<7;i++){
				if(date[i]<=year&&year<date[i+1]){
					freq[i]++;
					break;
				}
			}
		}
		for(int i = 0; i < 7; i++){
			cout << freq[i] << endl;
		}
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
  int n;
  for(;cin>>n,n;)
    {
      int a[7]={0},x;
      for(;n--;)
	{
	  cin>>x;
	  x=x/10;
	  if(x>6)
	    x=6;
	  a[x]++;
	}
      for(int i=0;i<7;i++)
	cout<<a[i]<<endl;
    }

}