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 <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 (age < 10) {
                ++ num[0];
            } else if (age < 20) {
                ++ num[1];
            } else if (age < 30) {
                ++ num[2];
            } else if (age < 40) {
                ++ num[3];
            } else if (age < 50) {
                ++ num[4];
            } else if (age < 60) {
                ++ num[5];
            } else {
                ++ num[6];
            }
        }
        for (int i=0; i<7; ++i) {
            cout << num[i] << endl;
        }
    }
    return 0;
}

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

int main()
{
  while(1)
  {
    int c[7] = {}, n;
    cin >> n;
    if(!n)
      break;
    for(int i = 0; i < n; i++)
    {
      int a;
      cin >> a;
      c[min(a / 10, 6)]++;
    }
    for(int i = 0; i < 7; i++)
      cout << c[i] << endl;
  }
}

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

int main( void )
{
	int n;
	while ( cin >> n && n )
	{
		vector <int> list( 7, 0 );

		int age;
		for ( int i = 0; i < n; i++ )
		{
			cin >> age;
			for ( int i = 1; i < 7; i++ )
			{
				if ( age < 10*i )
				{
					list[i-1]++;
					break;
				}
			}
			if ( age >= 60 )
				list[6]++;
		}

		for ( int i = 0; i < 7; i++ )
			cout << list[i] << endl;

	}
	return 0;
}

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

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

C++: #include <stdio.h>
int n, a, p[7];
int main() {
	while (true) {
		scanf("%d", &n);
		if (!n) break;
		for (int i = 0; i < 7; i++) p[i] = 0;
		for (int i = 0; i < n; i++) scanf("%d", &a), p[a < 60 ? a / 10: 6]++;
		for (int i = 0; i < 7; i++) printf("%d\n", p[i]);
	}
	return 0;
}

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

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int n, a, p[7];
int main() {
	while (true) {
		scanf("%d", &n);
		if (n == 0) break;
		for (int i = 0; i < 7; i++) p[i] = 0;
		for (int i = 0; i < n; i++) scanf("%d", &a), p[min(a / 10, 6)]++;
		for (int i = 0; i < 7; i++) printf("%d\n", p[i]);
	}
	return 0;
}

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

using namespace std;

int main(){

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

	return 0;
}

C++: #include<iostream>
#include<string.h>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main(){
    int n,x[100],i,a=0,b=0,c=0,d=0,e=0,f=0,g=0;
    while(cin>>n&&n!=0){
        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>
using namespace std;

int main()
{
	int n;
	int x;
	


	while(true){

		int a0=0 ,a10=0 ,a20=0 ,a30=0 ,a40=0 ,a50=0 ,a60=0;

		cin >> n;
		
		if(n==0)
			break;

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

			cin >> x;

			if(x>=0 && x<10)
				a0++;
			else if(x>=10 && x<20)
				a10++;
			else if(x>=20 && x<30)
				a20++;
			else if(x>=30 && x<40)
				a30++;
			else if(x>=40 && x<50)
				a40++;
			else if(x>=50 && x<60)
				a50++;
			else if(x>=60)
				a60++;

		}

		cout << a0 << endl;
		cout << a10 << endl;
		cout << a20 << endl;
		cout << a30 << endl;
		cout << a40 << endl;
		cout << a50 << endl;
		cout << a60 << endl;

	}
	
	return 0;

}

C++: #include<stdio.h>
int main(void){
	int input, i, j, people;
	while (scanf(" %d", &people), people){
		int age[7] = { 0 };
		for (i = 0; i<people; i++){
			scanf(" %d", &input);
			for (j = 1; input-10*j>0 && j<7; j++){
			}
			age[j - 1]++;
			//printf("    %d\n", j-1);
		}
		for (i = 0; i < 7; i++){
			printf("%d\n", age[i]);
		}
	}
	return 0;
}

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

C++: #include <iostream>
using namespace std;
int count[7];
int main(){
	int n,a;

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

	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    for(;;){
        int n;
        cin >> n;
        if(n == 0)
            return 0;

        vector<int> num(7, 0);
        for(int i=0; i<n; ++i){
            int a;
            cin >> a;
            a = min(a, 60);
            ++ num[a/10];
        }

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

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

using namespace std;

int Result[7];

int main() {
	int n, age;

	while (cin >> n, n) {
		memset(Result, 0, sizeof(Result));

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

			age /= 10;
			if (age > 6) {
				age = 6;
			}
			Result[age]++;
		}

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

	return 0;
}

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

int num[7];
int main(void){
	while(1){
		int n;
		scanf("%d",&n);
		if(n==0)break;
		memset(num,0,sizeof(num));
		for(int i=0;i<n;i++){
			int a;
			scanf("%d",&a);
			if(a>60)a=60;
			num[a/10]++;
		}
		for(int i=0;i<=6;i++)printf("%d\n",num[i]);
	}
    return 0;
}