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){
		if (n == 0)return 0;
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;
		int e = 0;
		int f = 0;
		int g = 0;
		for (int i = 0; i < n; i++){
			int q; cin >> q;
			if (q < 10)a++;
			else if (q < 20)b++;
			else if (q < 30)c++;
			else if (q < 40)d++;
			else if (q < 50)e++;
			else if (q < 60)f++;
			else g++;
		}
		cout << a << endl << b << endl << c << endl << d;
		cout << endl << e << endl << f << endl << g << endl;
	}
}

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

#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using dict = map<string,int>;
using pii = pair<int,int> ;

const int mod = 1000000007;
constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0};
const int dx[] = {0,-1,0,1};

inline bool value(int x,int y,int w,int h){
  return (x >= 0 && x < w && y >= 0 && y < h);
}

template<typename T>
void Unique(vector<T> &v){
  sort(all(v));
  v.erase(unique(all(v)),v.end());
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

void Ans(bool f){
  if(f) cout << "YES"<<endl;
  else cout << "NO"<<endl;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n,k;
  while(cin >> n&&n){
    vary(int,v,7,0);
    rep(i,n){
      cin >> k;
      rep(j,7){
        if( k < (j +1) * 10){
          v[j]++;
          break;
        }
        else if(k >= 60){
          v[6]++;
          break;
        }
      }
    }
    rep(i,7){
      cout << v[i]<<endl;
    }

  }
  return 0;
}

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

C++: #include <stdio.h>
#include <string.h>

int main(void)
{
int data[7] = {0};
int n;
int d;

while (1){

memset(data, 0, sizeof(data));
scanf("%d", &n);
if (n == 0){
	break;
}

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 <string>
#include <vector>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n, age;
    while (cin >> n, n) {
        int num[7] = {};
        for (int i=0; i<n; ++i) {
            cin >> age;
            if (60 <= age) ++ num[6];
            else ++ num[age/10];
        }
        for (int i=0; i<7; ++i) {
            cout << num[i] << endl;
        }
    }
    return 0;
}

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

int main(){
    int n;
    while(cin >> n, n){
        int age, count[7] = {0, 0, 0, 0, 0, 0, 0};
        while( n-- > 0 ){
            cin >> age;
            if( age <= 60 ) count[age/10]++;
            else count[6]++;
        }
        for(int i = 0; i < 7; i++){
            cout << count[i] << endl;
        }
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
	int year[7]={},n,f,num;
	while(cin>>n,n!=0){
		for(int i=0;i<7;i++)year[i]=0;
		for(int i=0;i<n;i++){
			cin>>num;
			num++;
			f=0;
			f=num/10;
			if(f>6)year[6]++;
			else year[f]++;
		}
		for(int i=0;i<7;i++)cout<<year[i]<<endl;
	}
}

C++: #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <complex>
#include <iterator>
#include <array>
#include <memory>
#include <stack>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double,double>pdd;
typedef pair<ll,ll>pll;
int main(){
    int n;
    while(cin>>n,n){
        vi v(7,0);
        rep(i,n){
            int gotiusa_is_a_god_especially_tiya;
            cin>>gotiusa_is_a_god_especially_tiya;
            v[gotiusa_is_a_god_especially_tiya/10]++;
        }
        rep(i,7)cout<<v[i]<<endl;
    }
}

C++: #include<iostream>
using namespace std;
int main() {
	int n;
	while (cin >> n&&n != 0) {
		int y[7], x[6] = { 9,19,29,39,49,59};
		fill(y, y + 7, 0);
		for (int i = 0; i < n; i++) {
			int a;
			cin >> a;
			bool b = false;
			for (int j = 0; j < 6; j++) {
				if (a <= x[j]) {
					y[j]++;
					b = true;
					break;
				}
			}
			if (!b) y[6]++;
		}
		for (int i = 0; i < 7; i++) {
			cout << y[i] << endl;
		}
	}
}

C++: /*
	0184:Turuga Castle
*/
#include	<iostream>

using namespace std;

int main(void) {
	const int cls_step[7] = {10, 20, 30, 40, 50, 60, -1};
	
	while(1) {
		int cls[7] = { 0 }, d;
		
		cin >> d;
		if(d == 0) { break; }
		for(int i = 0; i < d; i++) {
			int inp ;
			
			cin >> inp;
			for(int i = 0; i < 7; i++) {
				if(i == 6) { cls[i]++; }
				else {
					if(inp < cls_step[i]) {
						cls[i]++;
						break;
					}
				}
			}
		}
		for(int i = 0; i < 7; i++) {
			cout << cls[i] << endl;
		}
	}
}

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

int main() {
    int n;
    while(cin >> n, n) {
        vector<int> v(7);
        for(int i = 0; i < n; i++) {
            int s; cin >> s;
            if(s / 10 >= 6) {
                v[6]++;
            } else {
                v[s / 10]++;
            }
        }
        for(auto i : v) cout << i << endl;
    }

    return 0;
}