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

void printStar( int n )
{
    if ( n == 0 ) cout << "-";
    for ( int i = 0; i < n; i++ ) cout << "*";
    cout << endl;
}

int main( void )
{
    int n, k;

    while ( cin >> n && n )
    {
        vector <int> D( 10001, 0 );
        int maxK = 0;

        for ( int i = 0; i < n; i++ )
        {
            cin >> k;
            D[k]++;
            maxK = max( maxK, k );
        }

        for ( int i = 0; i <= maxK; i++ )
        {
            printStar( D[i] );
        }
    }

    return 0;
}

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

C++: #include<stdio.h>
int main(void)
{
	int n,a[10000],i,j,cnt=0;
	while(scanf("%d",&n)!=0){
		for(i=0;i<n;i++){
			scanf("%d",&a[i]);
		}
		for(j=0;j<n;j++){
			for(i=0;i<n;i++){
				if(a[i]==j){
					printf("*");
					cnt++;
				}
			}
			if(cnt==0){
				printf("-");
			}
			printf("\n");
		}
		cnt=0;
	}
	return 0;
}

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

C++: #include<iostream>
using namespace std;
int main (){
    int n;
    cin >> n;
    for (int i=0; i<n; i++){
        int a[i];
        cin >> a[i];}
    
    
    for (int i=0; i<n; i++){int a[i];
        if (a[i] != 0){int a[i];
            for (int j=0; j<a[i]; j++){
                cout << "*" ;
            }cout << endl;
        }
        else {
            cout << "-" << endl;
        }
    }return 0;
}

C++: #include <cstdio>
#include <algorithm>
using namespace std;
int icecream[10];

int main(){
    int n, t;
    for (; ;) {
        scanf("%d", &n);
        if (n == 0) break;
        fill(icecream, icecream+10, 0);
        for (int i = 0; i < n; i++) {
            scanf("%d", &t);
            icecream[t]++;
        }
        for (int i = 0; i < 10; i++) {
            if (icecream[i] == 0) printf("-\n");
            else {
                for (int j = 0; j < icecream[i]; j++) printf("*");
                printf("\n");
            }
        }
    }
    return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
  int n, i;
  while(cin >> n, n != 0){
    //    cout << '!' << endl;
    int ice[10] = {};
    while(n--) {
      cin >> i;
      ice[i]++;
    }
    for(i = 0; i < 10; i++) {
      if(ice[i])
	while(ice[i]--) cout << '*';
      else cout << '-';
      cout << endl;
    }
  }
  return 0;
}

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

using namespace std;

int main()
{
    int N;
    int inN;
    vector<int> vec(10,0);
    cin>>N;
    while(N){
        for(int i=0;i<N;i++){
            cin>>inN;
            vec[inN]++;
        }
        for(int i=0;i<10;i++){
            if(!vec[i]){
                cout<<"-"<<endl;
            }else{
                for(int j=0;j<vec[i];j++){
                    cout<<"*";
                }
                cout<<endl;
            }
            vec[i]=0;
        }
        cin>>N;
    }
}

C++: 

#include<stdio.h>

int main(){

int n[11]={};
int N,x;
while(1){
scanf("%d",&N);if(N==0)break;

for(int i=0;i<N;i++)
{
scanf("%d",&x);
n[x]++;
}

for(int i=0;i<10;i++)
{
if(n[i]>0){
for(int j=0;j<n[i];j++)
printf("*");}
else if(n[i]==0)printf("-");
printf("\n");
}

for(int i=0;i<10;i++)
	n[i]=0;
}
return 0;
}

C++: #include<cstdio>

int main(){
	int i,j;
	for(int n;scanf("%d",&n),n;){
		int p[10]={};
		for(i=n;i;--i){
			scanf("%d",&j),++p[j];
		for(i=0;i<10;++i,puts("")){
			for(j=0;j<p[i];++j)
				printf("*");
			if(!p[i])printf("-");
		}
	}
}

C++: #include <stdio.h>

int main(void)
{
	int a[10]={0};
	int n,i,j,k,l,x;
	
	for(j=0;j<20;j++)
	{
		//printf("?????°???");
		scanf("%d",&n);
		if(n==0)
		break;
		
		else
		{
			for(i=0;i<n;i++)
			{
				scanf("%d",&x);
				a[x]=a[x]+1;
			}
		}
	for(k=0;k<10;k++)
	{
		if(a[k])
		{
			for(l=0;l<a[k];l++)
			{
				printf("*");
			}
			printf("\n");
		}
		else printf("-\n");
	}
	}
	return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

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

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

int main(){
	while(1){
		int n;
		cin >> n;
		if(n == 0) break;
		int ans[10] = {0};
		for(int i = 0;i < n;i++){
			int k;
			cin >> k;
			ans[k]++;
		}
		for(int i = 0;i < 10;i++){
			for(int j = 0;j < ans[i];j++) cout << '*';
			if(ans[i] == 0) cout << '-';
			cout << endl;
		}
	}
	return 0;
}

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

int main() {
  while(true) {
    int n;
    cin >> n;
    if(n == 0) break;
    vector<int> ices(10, 0);
    for(int i = 0; i < n; ++i) {
      int type;
      cin >> type;
      ++ices[type];
    }
    for(int i = 0; i < 10; ++i) {
      if(ices[i] == 0) {
        cout << '-' << endl;
      } else {
        for(int j = 0; j < ices[i]; ++j) cout << '*';
        cout << endl;
      }
    }
  }
  return 0;
}

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

typedef long long ll;

ll gcd( ll x, ll y );
ll lcm( ll x, ll y );

int main()
{
    int n, c, a[11];

    while ( true ) {
        memset( a, 0, sizeof(a) );
        scanf("%d", &n );
        if ( n == 0 ) break;
        for ( int i = 0; i < n; i++ ) {
            scanf("%d", &c );
            a[c]++;
        }

        for ( int i = 0; i < 10; ++i ) {
            if ( a[i] != 0 ) {
                for ( int j = 0; j < a[i]; ++j ) {
                    printf("*");
                }
            } else {
                printf("-");
            }
            putchar('\n');
        }
    }

    return 0;
}

ll gcd( ll x, ll y )
{
    if ( y == 0 ) return x;
    return gcd( y, x % y );
}

ll lcm( ll x, ll y )
{
    return x / gcd( x, y ) * y;
}