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 <cstring>
using namespace std;

int main(void){
	int n;
	int t[10];

	while(cin>>n,n){
		memset(t,0,sizeof(t));
		for(int i=0;i<n;i++){
			int x;
			cin>>x;
			if(x/10 < 6){
				t[x/10]++;
			}
			else{
				t[6]++;
			}
		}

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

	return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int a,b;
	int ans[11];
	while (1) {
		cin >> a;
		if (a == 0) {
			goto a;
		}
		for (int i = 1; i <= 7; i++) {
			ans[i] = 0;
		}
		for (int i = 1; i <= a; i++) {
			cin >> b;
			if (b < 10) {
				ans[1] += 1;
			}
			else {
				if (b < 20) {
					ans[2] += 1;
				}
				else {
					if (b < 30) {
						ans[3] += 1;
					}
					else {
						if (b < 40) {
							ans[4] += 1;
						}
						else {
							if (b < 50) {
								ans[5] += 1;
							}
							else {
								if (b < 60) {
									ans[6] += 1;
								}
								else {
									ans[7] += 1;
								}
							}
						}
					}
				}
			}
		}
		for (int i = 1; i <= 7; i++) {
			cout << ans[i] << endl;
		}
	}
a:;
}

C++: #include <iostream>
#include <algorithm>
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;
			freq[min(year/10,6)]++;
		}
		for(int i = 0; i < 7; i++){
			cout << freq[i] << endl;
		}
	}
	return 0;
}

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

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

//ツ年ツ療ョツつゥツづァツイツδ督デツッツクツスツづーツ仰づ淞づゥツ．
int solve(int old){
	if(old < 10){
		return 0;
	}
	else if(old < 20){
		return 1;
	}
	else if(old < 30){
		return 2;
	}
	else if(old < 40){
		return 3;
	}
	else if(old < 50){
		return 4;
	}
	else if(old < 60){
		return 5;
	}
	else{
		return 6;
	}
}

int main(){
	int n, l[7] = {0};
	while(std::cin >> n, n){
		//init
		memset(l, 0, sizeof(l));

		//input
		while(n--){
			int o;
			std::cin >> o;
			l[solve(o)]++;
		}
		
		//output
		for(int i=0;i<7;i++){
			std::cout << l[i] << std::endl;
		}
	}
}

C++: #include<cstdio>
int main() {
	int n;
	while (scanf("%d", &n) && n != 0) {
		int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0;
		int tmp;
		for (int i=0; i<n; i++) {
			scanf("%d", &tmp);
			if (tmp < 10) a++;
			else if (tmp < 20) b++;
			else if (tmp < 30) c++;
			else if (tmp < 40) d++;
			else if (tmp < 50) e++;
			else if (tmp < 60) f++;
			else g++;
		}
		printf("%d\n%d\n%d\n%d\n%d\n%d\n%d\n", a, b, c, d, e, f, g);
	}
}

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

using namespace std;

int t[1000000];
int main()
{
	int n;
	while (scanf("%d", &n), n)
	{
		int visit[7];
		memset(visit, 0, sizeof(visit));
		for (int i = 0; i < n; ++i)
			scanf("%d", t+i);
		for (int i = 0; i < n; ++i)
			++visit[t[i]/10 >= 6 ? 6 : t[i]/10];
		for (int i = 0; i < 7; ++i)
			printf("%d\n", visit[i]);
	}

	return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<array>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<numeric>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<unordered_map>
#include<queue>
#include<vector>
using namespace std;

//#define int long long
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;

#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(a) (a).begin(),(a).end()
#define dump(o) {cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) {cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL
const int MOD = 1e9 + 7;

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

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cmath>
#include <ctime>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <iterator>
#include <functional>
#include <utility>
#include <algorithm>
#include <numeric>
#include <typeinfo>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define foreach(i,c) for(iter(c) i=(c).begin();i!=(c).end();++i)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

int main()
{
	for(int n;scanf("%d",&n),n;){
		vi hist(7);
		rep(i,n){
			int age; scanf("%d",&age);
			hist[min(age,60)/10]++;
		}
		rep(i,7)
			printf("%d\n",hist[i]);
	}
	
	return 0;
}

C++: #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b) - 1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)

#define PB push_back
#define INF INT_MAX/3
#define ALL(a) (a).begin(),(a).end()
#define CLR(a) memset(a,0,sizeof(a))

typedef long long int ll;

using namespace std;

int main(){
    while(true){
	int n;
	cin >> n;
	vector<int> ans(7,0);
	if(n == 0) break;
	REP(i,n){
	    int temp;
	    cin >> temp;
	    ans[min(temp/10,6)]++;
	}
	REP(i,7){
	    cout << ans[i] << endl;
	}
    }
    return 0;
}

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

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

    vector<int> cnt(7, 0);
    while (n--) {
      int age;
      cin >> age;

      if (age >= 60)
	++cnt[6];
      else
	++cnt[age/10];
    }

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

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

int main()
{
  vector<int> v(7);
  int n, i;
  while (cin>>n, n) {
    fill(v.begin(), v.end(), 0);
    for (i = n; i > 0; i--) {
      cin>>n;
      if (n>60) n = 60;
      v[n/10]++;
    }
    for (i = 0; i < 7; i++) cout<<v[i]<<endl;
  }

  return 0;
}