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 <cstdio>
#include <vector>

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

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

int main(void)
{
    int N;

    while(cin >> N, N){
        int d[10];
        for(int i = 0; i < 10; i++)
            d[i] = 0;

        int No;
        for(int i = 0; i < N; i++){
            cin >> No;
            d[No]++;
        }

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

return 0;
}

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

typedef long long ll;
typedef pair<int, int> P;

#define pb push_back
#define in ,
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define mod 1e9+7

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

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

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

int main(){
    while(1){
        int n, nums[10] = {0};
        cin >> n;
        if(!n) break;

        for(int i = 0;i < n;i++){
            int k;
            cin >> k;
            nums[k]++;
        }

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

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

C++: #include<cstdio>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int N;
    while(cin>>N){
        if(!N)break;
        int cou[10]={0};
        for(int i=0;i<N;i++){
            int a;
            cin>>a;
            cou[a]++;
        }
        for(int i=0;i<10;i++){
            if(cou[i]==0)cout<<"-"<<endl;
            else{
                for(int j=0;j<cou[i];j++)cout<<"*";
                puts("");
            }
        }
    }
}

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

int main()
{
  int n;

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

C++: #include <stdio.h>

int main()
{
    int n;
    int i, j;
    
    scanf("%d", &n);
    while (n != 0) {
        int ice[10] = {};
        int c;
        
        for (i = 0; i < n; i++) {
            scanf("%d", &c);
            ice[c]++;
        }

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

        scanf("%d", &n);
    }

    return 0;
}

C++: #include <iostream>

using namespace std;

int main() {

  int n;
  int ice[10];

  int a;

  while(1) {

    cin >> n;

    if(n==0) break;

    for(int i=0;i<10;i++) ice[i]=0;

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

      cin >> a;

      ice[a]++;

    }

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

      if(ice[i]==0) cout << "-";

      else for(int j=0;j<ice[i];j++) cout << "*";

      cout << endl;

    }

  }

  return 0;

}

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

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

C++: #define _USE_MATH_DEFINES
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
#include<functional>
using namespace std;
const int INF = INT_MAX / 2;

typedef long long ll;

int N;
ll d[10], v[10];

ll GCD(ll a, ll b)
{
	if(b == 0) return a;
	return GCD(b, a % b);
}

ll LCM(ll a, ll b)
{
	return a / GCD(a, b) * b;
}

int main(){
	while(cin >> N, N)
	{
		int K;
		int cnt[10] = {};
		for(int i = 0; i < N; i++)
		{
			cin >> K;
			cnt[K]++;
		}
		for(int i = 0; i < 10; i++)
		{
			if(cnt[i] == 0) puts("-");
			else
			{
				for(int j = 0; j < cnt[i]; j++)
				{
					printf("*");
				}
				puts("");
			}
		}
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

int main() {
  int n;
  while(cin>>n){
  int x,m  ;
  int a[10000];
  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<bits/stdc++.h>
using namespace std;
int main(){
  while(true){
    int n; cin>>n;
    if(!n) break;
    int a[10]={};
    for(int i=0;i<n;++i){
      int c;
      cin>>c;
      ++a[c];
    }
    for(int i=0;i<10;++i){
      for(int j=0;j<a[i];++j) cout<<"*";
      if(!a[i]) cout<<"-";
      cout<<"\n";
    }
  }
  return 0;
}

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

C++: #include<vector>
#include<list>
#include<algorithm>
#include<iostream>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
using namespace std;
int main(){
  int i,j;
  int a[10],m,n;
  while(cin>>n&&n){
    memset(a,0,sizeof(a));
    for(i=0;i<n;i++){
      cin>>m;
      a[m]++;
    }
    for(i=0;i<10;i++){
      if(a[i]){
	for(j=0;j<a[i];j++)
	  cout<<"*";
	cout<<endl;
      }else
	cout<<"-"<<endl;
    }
  }
  return 0;
}