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<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){
	while(1){
        int a[10]={0};
        int n;
        int b;
        cin>>n;
        if(n==0)break;
        for(int i=0;i<n;i++){
            cin>>b;
            if(b<=9)a[0]++;
            else if(b<=19)a[1]++;
            else if(b<=29)a[2]++;
            else if(b<=39)a[3]++;
            else if(b<=49)a[4]++;
            else if(b<=59)a[5]++;
            else a[6]++;
        }
        for(int i=0;i<7;i++){
            cout<<a[i]<<endl;

        }

	}
	return 0;
}

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[i]=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>

int count[7];
int main(){
	int n;
	while(true){
		std::cin>>n;
		if(!n){
			break;
		}
		for(int i =0; i < 7;i++){
			count[i]=0;
		}
		for(int i=0; i< n ;i++){
			int now;
			std::cin >> now;
			now = now /10;
			if(now > 6) now = 6;
			count[now]++;
		}
		for(int i = 0; i < 7 ;i++){
			std::cout << count[i] << std::endl;
		}
	}
}

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

int main()
{
  int n;
  while (cin >> n && n != 0){
    int a[7] = {0};
    while (n--){
      int age;
      cin >> age;
      if (age > 60){
        a[6]++;
        continue;
      }

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

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(){

	while(1){
		int n,i,human,sup,cns,output[7]={0};

		cin >> n;
		if(n==0) break;	

			for(i=0;i<n;i++){
				cin >> human;
				
				cns=10;
				for(sup=0;sup<=6;sup++){
					if(human<cns && human>=cns-10){
						output[sup]++;
					}
					
					if(human>60){
						output[6]++;
						break;
					}

					cns=cns+10;
				}
			}

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

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <iterator>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }

int main()
{
    for(int n; cin >> n && n; )
	{
		int p[8] = {0};
		
		rep(i, n)
		{
			int a;
			cin >> a;
			p[min(a, 60) / 10]++;
		}
		
		rep(i, 7) cout << p[i] << endl;
	}
}

C++: #include <bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second

template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, pll> pip;
const ll INF = 1ll<<60;
const ll MOD = 1000000007;
const double EPS  = 1e-9;

int main() {
	int n;
	while (cin >> n, n) {
		int cnt[7] = {};
		REP(i, n) {
			int a;
			scanf("%d", &a);
			
			a /= 10;
			if (a >= 6) cnt[6]++;
			else cnt[a]++;
		}
		
		REP(i, 7) cout << cnt[i] << endl;
	}
	return 0;
}

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

int main(){
	int n, a;
	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 >> 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]++;
		}
		for(int i=0 ; i<7 ; i++){
			cout << ans[i] << endl;
		}
	}
}

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

int judge(int);

int main(void){
  int n,age;

  for(;;){
    int cnt[7]={0};

    cin >> n;
    if( n == 0 ) break;

    for( int i = 0 ; i < n ; i++ ){
      cin >> age;
      cnt[judge(age)]++;
    }

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

  return 0;
}

  int judge(int age){
   
    switch(age/10){

    case 0:return 0;
    case 1:return 1;
    case 2:return 2;
    case 3:return 3;
    case 4:return 4;
    case 5:return 5;
    default:return 6;

    }

}

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{{}};

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

    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
  int n;
  while(1){
    scanf("%d", &n);
    if(n == 0) break;
    int pep[7] = {0};
    for(int i = 0; i < n; i++){
      int old;
      scanf("%d", &old);
      pep[(old >= 60 ? 6 : old / 10)]++;
    }
    for(int i = 0; i < 7; i++){
      printf("%d\n", pep[i]);
    }
  }
}