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(){
    int n;
    while( cin >> n , n ){
        int a[7] = {0}, age;

        for(int i=0 ; i < n ; i++ ){
            cin >> age;
            if( age >= 60 ) 
                age = 60;
            a[age/10]++;
        }
        for(int i=0 ; i < 7 ; i++ ){
            cout << a[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 <vector>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

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

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

#define gcu getchar_unlocked
#define pcu putchar_unlocked
#define _T template <typename T>
#define _HT template <typename H, typename... T>
#define _il inline
#define _in _il int in
#define _sc _il bool scan
_T T in(int c){T n=0;bool m=false;while(isspace(c)){c=gcu();}if(c=='-')m=true,c=gcu();
	do{n=10*n+(c-'0'),c=gcu();}while(c>='0'&&c<='9');return m?-n:n;}
_in() {return in<int>(gcu());}
_T T scan(T &n){int c=gcu();return c==EOF?false:(n=in<T>(c),true);}
_sc(char &c){c=gcu();gcu();return c!=EOF;}
#ifdef _GLIBCXX_STRING
_sc(string &s){int c;s="";
	for(;;){c=gcu();if(c=='\n'||c==' ')return true;else if(c==EOF)return false;s+=c;}}
#endif
_HT _sc(H &h, T&&... t){return scan(h)&&scan(t...);}
#define _vo _il void out
#define _vl _il void outl
_vo(bool b) {pcu('0'+b);}
_vo(const char *s){while(*s)pcu(*s++);}
_vo(char c){pcu(c);}
#ifdef _GLIBCXX_STRING
_vo(string s){for(char c:s)pcu(c);}
#endif
_T _vo(T n){static char buf[20];char *p=buf;
	if(n<0)pcu('-'),n*=-1;if(!n)*p++='0';else while(n)*p++=n%10+'0',n/=10;
	while (p!=buf)pcu(*--p);}
_vl(){out('\n');}
#ifdef _GLIBCXX_VECTOR
_T _vo(vector<T> &v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);outl();}
#endif
_HT _vo(H&& h, T&&... t){out(h);out(move(t)...);}
template <typename... T> _vl(T&&... t){out(move(t)...);outl();}

int main() {
	for (int n; (n = in());) {
		array<int, 7> A = {};
		while (n--) {
			int a = in();
			A[a < 60 ? a / 10 : 6]++;
		}
		for (int c: A)
			outl(c);
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
typedef long long int lld;

int main(){
  int dif[] = {10,20,30,40,50,60};
  while(1){
    int n;
    int cnt[7] = {0};
    scanf("%d",&n);
    if(n == 0) break;
    for(int i=0;i<n;i++){
      int num;
      scanf("%d",&num);
      for(int i=0;i<7;i++){
	if(i+1 == 7) cnt[i]++;
	if(num < dif[i]) {
	  cnt[i]++;
	  break;
	}
      }
    }
    for(int i=0;i<7;i++){
      cout << cnt[i] << endl;
    }
  }
}

C++: #include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    int n;
    while(cin >> n, n){
        vector<int> a{10, 20, 30, 40, 50, 60, 200};
        vector<int> v(n);
        vector<int> cnt(7);
        for (auto &&i : v) {
            scanf("%d", &i);
            for (int j = 0; j < 7; ++j) {
                if(i < a[j]){
                    cnt[j]++;
                    break;
                }
            }
        }
        for (int i = 0; i < 7; ++i) {
            cout << cnt[i] << "\n";
        }
    }
    return 0;
}

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\b.answer"
int main() {
	while (1) {
		int N; cin >> N;
		if (!N)break;
		vector<int>nums(7);
		for (int i = 0; i < N; ++i) {
			int a; cin >> a;
			a /= 10;
			if (a >= 6)a = 6;
			nums[a]++;
		}
		for (auto n : nums)cout << n << endl;
	}
	return 0;
}

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

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

C++: #include <iostream>

using namespace std;

int main(){
  int n;
  int nenrei;

  while(cin >> n,n ){
  int ans0=0,ans10 = 0,ans20 = 0,ans30 = 0,ans40 = 0,ans50 = 0;
  int ansover = 0;

    for(int i = 0;i < n;i++){    

      cin >> nenrei;
      if(nenrei<10)ans0++;
      else if(nenrei<20)ans10++;
      else if(nenrei<30)ans20++;
      else if(nenrei<40)ans30++;
      else if(nenrei<50)ans40++;
      else if(nenrei<60)ans50++;
      else ansover++;
         }
    cout << ans0 << endl;
    cout <<ans10 << endl;
    cout <<ans20 << endl;
    cout << ans30 << endl;
    cout <<ans40 << endl;
    cout <<ans50 << endl;
    cout <<ansover << endl;

  }
  return 0;
}

C++: #include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cmath>
#define pb(in,tmp) in.push_back(tmp)
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,b) loop(i,0,b)
#define all(in) in.begin(),in.end()
using namespace std;
int main(){
int a[7]={60,50,40,30,20,10,0};
int in;
while(cin>>in,in){
int b[7]={0};
rep(i,in){
int in1;
cin>>in1;
rep(j,7){
if(a[j]<=in1){b[6-j]++;break;}
}
}
rep(i,7)cout<<b[i]<<endl;
}
}

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

int main() {
	int n;
	while(cin >> n, n) {
		int ans[8] = {0};
		for(int i = 0; i < n; i++) {
			int a;
			cin >> a;
			if(a > 60)
				a = 60;
			ans[a / 10]++;
		}
		for(int i = 0; i < 7; i++)
			cout << ans[i] << endl;
	}
}

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