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
		}
		a := make([]int, 10)
		for i := 0; i < n; i++ {
			scanner.Scan()
			c, _ := strconv.Atoi(scanner.Text())
			a[c]++
		}
		for _, v := range a {
			if v == 0 {
				fmt.Println("-")
				continue
			}
			for i := 0; i < v; i++ {
				if i == v-1 {
					fmt.Println("*")
				} else {
					fmt.Print("*")
				}
			}
		}
	}
}

C++: #include<iostream>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;
int dt[10];
int main(){
  int n,m;
  while(cin>>n,n){
    rep(i,10)dt[i]=0;
    rep(i,n){
      cin>>m;
      dt[m]++;
    }
    rep(i,10){
      if(dt[i]==0)cout<<'-'<<endl;
      else{
	rep(j,dt[i])cout<<"*";
	cout<<endl;
      }
    }
  }
  return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){

  int n;
  while(0!=cin >> n){
    vector<int>co;
    int i;
    int no;
    for(i=0;i<10;i++)
      co.push_back(0);
    for(i=0;i<n;i++){
      cin >> no;
      co[i]++;
    }
    for(i=0;i<10;i++){
      int j;
      for(j=0;j<co[i];j++)
	cout << '*';
      if(co[i]==0)
	cout << '-';
      cout << endl;
    }
  }
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
typedef pair<int, int> P;

int main() {
    while (true) {
        int n;
        cin >> n;
        if (n == 0) break;

        int lis[10];
        fill(lis, lis+10, 0);
        rep(i, n) {
            int c;
            cin >> c;
            lis[c]++;
        }

        rep(i, 10) {
            if (lis[i] == 0) cout << '-';
            else rep(j, lis[i]) cout << '*';
            cout << endl;
        }
    }

    return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
int main(){
int n,k=0,s[10011]={};
while(1){
memset(s,0,sizeof(s));
cin >> n;
if(n==0){
break;
}
for(int i=0;i<n;i++){
cin >> k;
s[k]++;
k=0;
}
for(int a=0;a<10;a++){
if(s[a]!=0){
for(int i=0;i<s[a];i++){
cout << "*";
}
}else{
cout << "-";
}
cout << "\n";
}
}
return(0);
}

C++: #include <cstdio>
#include <vector>
using namespace std;
int main() {
	int n,num;
	while (scanf("%d",&n)&&n!=0) {
		vector<int> ice(10,0);
		for (int i=0; i<n; i++) {
			scanf("%d",&num);
			ice[num]++;
		}
		for (int i=0; i<10; i++) {
			if (ice[i]==0) {
				printf("-");
			} else {
				for (int j=0; j<ice[i]; j++) printf("*");
			}
			printf("\n");
		}
	}
}

C++: #include<iostream>

using namespace std;

int main() {
  int n;
  while(cin>>n){
    if(n==0){break;}
    int x,m;
    int a[10000];
    for(int i =0;i<1000;i++){
      a[i]=0;
    }
  for(int i =0;i<n;i++){
    cin >> m;
    a[m] += 1;
  }
  for(int j =0;j<10;j++){
    if(a[j]==0){
      cout << "-";
    }else{
      for(int k =0;k<a[j];k++){
	cout << "*";
      }
    }
    cout << endl;
  }
  }
	return 0;
}

C++: #include<stdio.h>
int main()
{
	int n,i,j,ggg;
	int val[10]={0};
	
	while(scanf("%d",&n))
	{
		if(n==0)
		{
			break;
		}
		for(i=0;i<n;i++)
		{
			scanf("%d",&j);
			val[j]++;
		}
		for(i=0;i<10;i++)
		{
			ggg=val[i];
			val[i]=0;
			if(ggg==0)
			{
				printf("-\n");
			}
			else
			{
				for(j=0;j<ggg;j++)
				{
					printf("*");
				}
				puts(" ");
			}
		}
	}	
	return 0;
}

C++: // 2012/08/08 Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		int n;
		cin >> n;

		if(n==0)
			break;

		int cnt[10] = {0};

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

			cnt[ice]++;
		}

		for(int i=0; i<10; i++){
			if(cnt[i]==0){
				cout << '-' << endl;
			}
			else{
				for(int j=0; j<cnt[i]; j++){
					cout << '*';
				}
				cout << endl;
			}
		}
	}

	return 0;
}

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

int main(){

  int n;
  while(cin >> n && n != 0){
    int x[11] ={};
    for(int i = 0; i < n; i++){
      int tmp;
      cin >> tmp;
      x[tmp]++;
    }
    for(int i = 0; i < 10; i++){
      if(x[i] == 0) cout << "-" << endl;
      else{
	//	cout << x[i] << " ";
	for(int j = 0; j < x[i]; j++){
	  cout << "*";
	}
	cout << endl;
      }
    }
  }


}

C++: #include<iostream>
#include<string.h>
using namespace std;
int main() {
	int a, b, c[10] = { 0 }, i, j;
	while (1) {
		cin >> a;
		if (a == 0) 
			return 0;
		for (i = 0; i < a; i++) {
			cin >> b;
			c[b]++;
		}
		for (i = 0; i < 10; i++) {
			for (j = 0; j < c[i]; j++) 
				cout << "*";
			if (j == 0) {
				cout << "-";
			}
			cout << endl;
		}
		memset(c, 0, sizeof(c));
	}
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cstring>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <fstream>
#include <complex>
#include <stack>
#include <queue>

using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
static const double EPS = 1e-5;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)

int main(void){
  int n;
  while(cin>>n){
    if(n==0) break;
    int c[10]={};
    REP(i,n){
      int tmp;
      cin>>tmp;
      c[tmp]++;
    }
    REP(i,10){
      if(c[i]==0){
        putchar('-');
      }else{
        REP(j,c[i])putchar('*');
      }
      putchar('\n');
    }
  }
  return 0;
}

C++: #include<cstdio>
#include<cstring>
int main(){
 int a,j,b[10];
 while(1){
  scanf("%d",&a);
 if(a==0) return 0;
 memset(b,0,sizeof(int)*10);
 for(int i=0;i<a;i++){
  scanf("%d",&j);
  b[j]++;
 }
 for(int i=0;i<10;i++){
  if(s==0){
  printf("-\n");
 continue; 
 }
  for(int s=0;s<b[j];s++){
    printf("*");
  }
  printf("\n");
 }
 }
}

C++: #include <iostream>
#include <stdio.h>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>
#include <set>
#include <math.h>
#include <utility>
#include <stack>
#include <string.h>
#include <complex>
using namespace std;

const int INF = 1<<29;
const double EPS = 1e-8;
typedef vector<int> vec;
typedef pair<int,int> P;


int main(){
    while(1){
        int n;
        scanf("%d",&n);
        if(!n)break;

        vector<int> num(10,0);
        for(int i=0;i<n;i++){
            int t;
            scanf("%d",&t);
            num[t]+=1;
        }
        for(int i=0;i<10;i++){
            if(num[i]>0){
                for(int j=0;j<num[i];j++){
                    printf("*");
                }
                printf("\n");
            }else{
                cout << "-" << endl;
            }
        }
    }

    return 0;
}

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

using namespace std;

int main(){
	
	int n;
	
	while(true){
		cin >> n;
		if(n == 0){
			break;
		}
		
		int count[10];
		
		for(int i = 0; i < 10; i++){
			count[i] = 0;
		}
		
		for(int i = 0; i < n; i++){
			int hoge;
			cin >> hoge;
			count[hoge]++;
		}
		
		for(int i = 0; i < 10; i++){
			if(count[i] == 0){
				cout << "-" << endl;
			}else{
				for(int j = 0; j < count[i]; j++){
					cout << "*";
				}
				cout << endl;
			}
		}
		
	}
	
	return 0;
}

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

int main() {
	int n;
	while(cin >> n, n) {
		int a[10] = {};
		for(int i = 0; i < n; i++) {
			int b; cin >> b;
			a[b]++;
		}
		for(int i = 0; i < 10; i++) {
			if(a[i]) {
				for(int j = 0; j < a[i]; j++)
					cout << "*";
				cout << endl;
			}
			else
				cout << "-" << endl;
		}
	}
}