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<vector>
#include<list>
#include<algorithm>
#include<iostream>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
using namespace std;
int main(){
  int i;
  int a[7],n,g;
  for(;;){
    cin>>n;
    if(n==0)
      break;
    memset(a,0,sizeof(a));
    for(i=0;i<n;i++){
      cin>>g;
      if(g<10)
	a[0]++;
      else if(g<20)
	a[1]++;
      else if(g<30)
	a[2]++;
      else if(g<40)
	a[3]++;
      else if(g<50)
	a[4]++;
      else if(g<60)
	a[5]++;
      else
	a[6]++;
    }
    for(i=0;i<7;i++)
      cout<<a[i]<<endl;
  }
  return 0;
}

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

C++: #include <cstdio>

int main(void)
{
	int n;
	
	while (scanf("%d", &n)){
		if (n == 0) break;
		int a[7] = {0}, tmp;
		for (int i = 0; i < n; i++){
			scanf("%d", &tmp);
			if (0 <= tmp && tmp < 10) a[0]++;
			else if (10 <= tmp && tmp < 20) a[1]++;
			else if (20 <= tmp && tmp < 30) a[2]++;
			else if (30 <= tmp && tmp < 40) a[3]++;
			else if (40 <= tmp && tmp < 50) a[4]++;
			else if (50 <= tmp && tmp < 60) a[5]++;
			else if (60 <= tmp) a[6]++;
		}
		for (int i = 0; i < 7; i++){
			printf("%d\n", a[i]);
		}
	}
	
	return (0);
}

C++: #include<iostream>
#include<string.h>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main(){
    int n,x[100],i,j,a=0,b=0,c=0,d=0,e=0,f=0,g=0;
    for(;;){
        cin>>n;
        if(n==0){
            break;
        }
        for(i=0;i<n;i++){
            cin>>x[i];
            if(x[i]<10){
                a++;
            }
            else if(x[i]>=10&&x[i]<20){
                b++;
            }
            else if(x[i]>=20&&x[i]<30){
                c++;
            }
            else if(x[i]>=30&&x[i]<40){
                d++;
            }
            else if(x[i]>=40&&x[i]<50){
                e++;
            }
            else if(x[i]>=50&&x[i]<60){
                f++;
            }
            else if(x[i]>=60){
                g++;
            }
        }
        cout<<a<<endl<<b<<endl<<c<<endl<<d<<endl<<e<<endl<<f<<endl<<g<<endl;
    }
    return 0;
}

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

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

  while(1)
    {
      cin >> num;
      if(num == 0) break;
      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>
#include <stdlib.h>

using namespace std;

int main(int argc, char **argv)
{
	int n, tmp, *array;
	
	while(1){
		cin >> n;
		if(n == 0){
			break;
		}
		array = (int *)calloc(7, sizeof(int));
		for(int i = 0; i < n; i++){
			cin >> tmp;
			
			if(tmp > 60){
			tmp = 60;
			}
			array[tmp/10]++;
		}
		for(int i = 0; i < 7; i++){
			cout << array[i] << endl;
		}
		
		free(array);
	}
	
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <stdio.h>
#include <string>
#include <string.h>
#include <cstring>
#include <sstream>
#include <iomanip>
#include <stdlib.h>

using namespace std;

int main (void)
{
	for (int u = 0; u < 100; u++)
	{
	long n;
	cin >> n;
	int a[10000],pp = 0;

	for (long i = 0; i < n; i++)
	{
		cin >> a[i];
		if (a[i] == 0)
		{
			pp = -1;
		}
	}
	
	if (pp != 0)
	{
		break;
	}

	int o = 0,p = 0,q = 0,r = 0,s = 0,t = 0,u = 0;

	for (long i = 0; i < n; i++)
	{
		if (a[i] < 10)
		{
			o++;
		}
		else if (a[i] < 20)
		{
			p++;
		}
		else if (a[i] < 30)
		{
			q++;
		}
		else if (a[i] < 40)
		{
			r++;
		}
		else if (a[i] < 50)
		{
			t++;
		}
		else
		{
			u++;
		}

		cout << o << endl << p << endl << q << endl << r << endl << s << endl << t << endl << u << endl ;
	}
	}
}

C++: #include<iostream>
using namespace std;
int main(){
  int n,data[1000000],age[7];
  while(cin >>n && n!=0){
    for(int i=0;i<7;i++)age[i]=0;
    for(int i=0;i<n;i++){
    cin >>data[i];
    if(data[i]<10) age[0]++;
    else if(data[i]>=10 && data[i]<20) age[1]++;
    else if(data[i]>=20 && data[i]<30) age[2]++;
    else if(data[i]>=30 && data[i]<40) age[3]++;
    else if(data[i]>=40 && data[i]<50) age[4]++;
    else if(data[i]>=50 && data[i]<60) age[5]++;
    else if(data[i]>=60) age[6]++;
    }
    for(int i=0;i<7;i++)
      cout <<age[i]<<endl;
  }
  return 0;}

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

int m,n;
int p[7]

int main(){
	cin >> n;
	if(!n)
		return 0;
	for(int i=0; i<7; i++)
		p[i] = 0;
	for(int i=0; i<n; i++){
		cin >> m;
		if(m>=70)
			m = 60;
		p[m%10]++;
	}
	for(int i=0; i<7; i++)
		cout << p[i] << endl;
}

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

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);

    long long int n;

    while (std::cin >> n, n) {
        std::array<long long int, 7> arr{{}};
        int age;
        for (; n--;) {
            std::cin >> age;
            age = (age < 60 ? age : 60);
            ++arr[(int)(age * 0.1)];
        }

        for (const auto& cnt : arr) {
            std::cout << cnt << std::endl;
        }
    }

    return 0;
}

C++: #include<iostream>
int main() {
  int am[7]={0,0,0,0,0,0,0};
  int i,k;
  while(1) {
    std::cin>>i;
    if(i==0)break;
    for(int j=0;j<i;j++) {
      std::cin>>k;
      if(k>60)k=60;
      am[k/10]++;
    }
    for(i=0;i<7;i++) std::coutam[i]<<"\n",am[i]=0;
  }
}

C++: #include<bits/stdc++.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define itrep(it, a) for(it = (a).begin(); it != (a).end(); it++)
#define all(a) (a).begin(), (a).end()
#define debug(x) cout << "debug " << x << endl;
#define INF (1 << 30)
using namespace std;

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

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    int N;
    while(cin>>N,N){
        int data,old[10]={0};
        while(N--){
            cin>>data;
            data/=10;
            if(data>5)data=6;
            old[data]++;
        }
        for(int i=0;i<7;i++){
            cout<<old[i]<<endl;
        }
    }
    return 0;
}