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 <utility>

using namespace std;

typedef unsigned long long BigInt;

BigInt lcm(BigInt a, BigInt b) {
  BigInt x = a;
  BigInt y = b;
  while (x != y) {
    if (x > y) {
      y += (x - y) / b * b;
      if (x > y) {
        y += b;
      }
    } else {
      x += (y - x) / a * a;
      if (x < y) {
        x += a;
      }
    }
  }
  return x;
}

BigInt gcd(BigInt a, BigInt b) {
  if (a < b) {
    swap(a, b);
  }
  while (b > 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}

int main() {
  int n;
  BigInt dh, vh;
  BigInt d[10], v[10];
  while (true) {
    cin >> n;
    if (n == 0) {
      return 0;
    }
    for (int i = 0; i < n; ++i) {
      cin >> d[i] >> v[i];
    }
    dh = d[0];
    vh = v[0];
    for (int i = 1; i < n; ++i) {
      BigInt y = lcm(v[i] * dh, vh * d[i]);
      BigInt kh = y / (v[i] * dh);
      BigInt z = gcd(dh * kh, vh);
      dh = dh * kh / z;
      vh /= z;
    }
    for (int i = 0; i < n; ++i) {
      cout << dh * v[i] / (d[i] * vh) << endl;
    }
  }
}

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

using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype

template <class T>
int __builtin_popcount(T n) { return n ? 1 + __builtin_popcount(n & (n - 1)) : 0; }
#endif

#define foreach(it, c) for (__typeof__((c).begin()) it=(c).begin(); it != (c).end(); ++it)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define popcount __builtin_popcount

const double EPS = 1e-8;
typedef long long ll;
typedef pair<int, int> pint;


int main()
{
	int n;
	while (scanf("%d", &n), n)
	{
		int ice[10];
		memset(ice, 0, sizeof(ice));
		for (int i = 0; i < n; ++i)
		{
			int w;
			scanf("%d", &w);
			++ice[w];
		}
		for (int i = 0; i < 10; ++i)
		{
			if (ice[i])
				while (ice[i]--)
					putchar('*');
			else
				putchar('-');
			putchar('\n');
		}
	}

	return 0;
}

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

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

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

int main(){
	int n;
	int ice[10000];
	int k[16];

	while(cin >>n,n){

		for(int i=0;i<16;i++){
			k[i]=0;
		}

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


		for(int i=0;i<n;i++){
			switch(ice[i]){
				case 0: k[0]++; break;
				case 1: k[1]++; break;
				case 2: k[2]++; break;
				case 3: k[3]++; break;
				case 4: k[4]++; break;
				case 5: k[5]++; break;
				case 6: k[6]++; break;
				case 7: k[7]++; break;
				case 8: k[8]++; break;
				case 9: k[9]++; break;
			}
		}
/*
		cout <<endl;
		for(int i=0;i<10;i++)
			cout << k[i] <<endl;
*/		

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

	}


	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <iomanip>
#include <string> 
#include <vector> 
using namespace std;
  
int main(){
    /*??£???????????????????????????
            int a[2];
            cin >> a[1] >> a[2];
            cout << "[+] " << a[1] + a[2] << endl;
            cout << "[-] " << a[1] - a[2] << endl;
            cout << "[*] " << a[1] * a[2] << endl;
            cout << "[/] " << a[1] / a[2] << endl;
    */

    int a;
    while(cin >> a){
        if(a == 0){break;}
        int ans[9] = {0,0,0,0,0,0,0,0,0};
        string ans2[9] = {"","","","","","","","",""};
        int p;
        for(int i = 1;a >= i;i++){
            cin >> p;ans[p]++;
        }
        for(int i = 0;8 >= i;i++){
            if(ans[i] == 0){
                ans2[i] = "-";
            }else{
                for(int ii = 1;ans[i] >= ii;ii++){
                    ans2[i] += "*";
                }
            }
            cout << ans2[i] << endl;
        }

    }
}

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<iostream>
using namespace std;
int main(){
  int n,bell,hess=0,aice[100]={0};
  while(1){
    for(int i=0;i<100;i++){
      aice[i]=0;
    }
    cin >> n;
    if(n==0){
      break;
    }
    for(int i=0;i<n;i++){
      cin >> bell;
      aice[bell]++;
    }
    for(int i=0;i<10;i++){
      for(int j=0;j<aice[i];j++){
	hess++;
	cout << "*";
      }
      if(hess==0){
	cout << "-";
      }
      hess=0;
      cout << endl;
    }
  }
  return (0);
}

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

using namespace std;

int main() {
  int n, a;
  cin >> n;
  int b[10] = {};
  for (; cin >> a;) {
    b[a] += 1;
  }
  for (int i = 0; i < 10; i++) {
    if (b[i] > 0){
    string s(b[i], '*');
    cout << s << endl;
  } else {
    cout << '-' << endl;
  }
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
    for(int XX = 0;XX<20;XX++){
    int n;
    cin >> n;
    
    if(n==0){
        break;
    }
    
    int x[10] = {0};
    for(int i=0;i<n;i++){
        int c;
        cin >> c;
        x[c]++;
    }
    
    for(int i=0;i<10;i++){
        if(x[i]!=0){
            for(int j=0;j<x[i];j++){
                cout << "*";
            }
            cout << endl;
        }
        else{
            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++: #include <bits/stdc++.h>
using namespace std;

int main()
{
    int N;

    while ( cin >> N, N != 0 ) {
        int cnt[10] = {};
        for ( int i = 0; i < N; i++ ) {
            int a;
            cin >> a;
            cnt[a]++;
        }
        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 );
}