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 argc, char const* argv[])
{
	int n;
	int data[7];

	while( cin >> n && n != 0 ){
		for( int i = 0;i < 7;i++ ) data[i] = 0;
		for( int i = 0;i < n;i++ ){
			int target;
			cin >> target;

			if( target >= 0 && target < 10 ) data[0]++;
			else if( target >= 10 && target < 20 ) data[1]++;
			else if( target >= 20 && target < 30 ) data[2]++;
			else if( target >= 30 && target < 40 ) data[3]++;
			else if( target >= 40 && target < 50 ) data[4]++;
			else if( target >= 50 && target < 60 ) data[5]++;
			else if( target >= 60 ) data[6]++;
		}
		for( int i = 0;i < 7;i++ ){
			cout << data[i] << endl;
		}
	}
	return 0;
}

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

int main() {
  int n,age,a[7] = {};
  while(cin >> n) {
    if(n == 0) break;
    int a[7] = {};
    for(int i=0;i<n;i++) {
      cin >> age;
      age/=10;
      if(age <= 5) {
      a[age]++;
      }
      else {
        a[6]++;
      }
    }

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

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
	int n;
	while(cin>>n,n){
		int p[7]={0};
		for(int i=0;i<n;i++){
			int d;
			cin>>d;
			p[(d>=60?6:d/10)]++;
		}
		for(int i=0;i<7;i++)cout<<p[i]<<endl;
	}
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <complex>
#include <algorithm>
#include <vector>
#include <stack>
#include <string>
#include <queue>
#include <cmath>
#include <math.h>
#include <numeric>
#include <list>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <climits>
#include <set>
#include <memory.h>
#include <memory>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cassert>
#include <map>
#include <cassert>
#include <time.h>
#include <ctime>

using namespace std;

typedef complex<double> xy_t;
typedef pair<xy_t, xy_t> line;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int , P> PP;
typedef pair<int, string> Ps;
typedef vector<int> vec;
typedef vector<vec> mat;
const int INF = 1 << 30;
const double EPS = 1e-9;
const double PI = 3.1415926535897932384626433832795;
const int CLK = CLOCKS_PER_SEC;

#define rep(i, n) for(int i = 0; i < n; i++)
#define rep2(i, m, n) for(int i = m; i < n; i++)

int nums[7];
int main(){
	int n, num;
	while(cin >> n && n){
		fill(nums, nums + 7, 0);
		rep(i, n){
			cin >> num;
			if(num < 10) nums[0]++;
			else if(num < 20) nums[1]++;
			else if(num < 30) nums[2]++;
			else if(num < 40) nums[3]++;
			else if(num < 50) nums[4]++;
			else if(num < 60) nums[5]++;
			else nums[6]++;
		}
		rep(i, 7) cout << nums[i] << endl;
	}
	return 0;
}

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

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

#define loop(v, f, l) for(int v = (f), v##_ = (l); v < v##_; ++v)

using namespace std;

typedef long long int lint;
static inline int in(){ int x; scanf("%d", &x); return (x); }
static inline lint inl(){ lint x; scanf("%lld", &x); return (x); }

int getIndex(int old)
{
	if( old >= 60 )return (6);
	return (old / 10);
}

int main()
{
	int n;
	int num[7];
	
	while(true)
	{
		n = in();
		if( n == 0 )break;
		for(int i = 0; i < 7; i++)num[i] = 0;
		
		for(int i = 0; i < n; i++)
		{
			num[getIndex(in())]++;
		}
		for(int i = 0; i < 7; i++)
		{
			printf("%d\n", num[i]);
		}
	}
	return (0);
}

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

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

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>

using namespace std;

int main()
{
	int n, num[7];
	while(true){
		cin >> n;
		if(n == 0){
			break;
		}
		for(int i = 0; i <= 6; i++){
			num[i] = 0;
		}
		int d;
		for(int i = 0; i < n; i++){
			cin >> d;
			d = min(d, 60);
			num[d / 10]++;
		}
		for(int i = 0; i <= 6; i++){
			cout << num[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[age / 10];
        }

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

    return 0;
}

C++: #include<iostream>
int main(){int a[7]={0,0,0,0,0,0,0};int i,k;while(std::cin>>i){if(i!=0){for(int j=0;j<i;j++)std::cin>>k,k>60?a[6]++:a[k/10]++;for(i=0;i<7;i++)std::cout<<a[i]<<"\n",a[i]=0;}}}

C++: #include <iostream>

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 <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>
#include <ctime>
#include <cstdlib>

using namespace std;

inline int to_int(string s) {int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string to_str(T x) {ostringstream sout; sout << x; return sout.str();}

typedef long long ll;

int main()
{
	int n;
	while(cin >> n)
	{
		if(!n)
		{
			break;
		}

		int a, mx = 0, age[256] = { 0 };
		for(int i = 0; i < n; i++)
		{
			cin >> a;
			age[a]++;
			mx = max(a, mx);
		}

		int sum = 0;
		for(int i = 0; i <= mx; i++)
		{
			if( i <= 60 && i > 0&& i % 10 == 0)
			{
				cout << sum << endl;
				sum = 0;
			}
			sum += age[i];
		}
		cout << sum << endl;
	}
}

C++: #include<stdio.h>
int main(void)
{
	int a,b,c,d,e,f,g;
	int n;
	int i;
	int m;

	scanf("%d",&n);
	while(n!=0){
	a=b=c=d=e=f=g=0;
		for(i=0;i<n;i++){
			scanf("%d",&m);
			if(m<10){
				a++;
			}
			else if(m<20){
				b++;
			}
			else if(m<30){
				c++;
			}
			else if(m<40){
				d++;
			}
			else if(m<50){
				e++;
			}
			else if(m<60){
				f++;
			}
			else if(m>=60){
				g++;
			}
		}
	printf("%d\n%d\n%d\n%d\n%d\n%d\n%d\n",a,b,c,d,e,f,g);
	scanf("%d",&n);
	}
	
	return 0;
}