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<bits/stdc++.h>
#define F first
#define S second
#define endl '\n'
#define lcm( a, b ) ((a)/__gcd(a,b)*(b))
#define MP make_pair
#define pb push_back
#define all(x) (x).begin(),(x).end()

using namespace std;

typedef long long LL;
typedef pair<int, int> P;
typedef pair<int, P> i_P;
typedef pair< LL, LL > L_P;

const int INF = INT_MAX;
const int MIN = INT_MIN;
const LL LINF = LLONG_MAX;
const int MOD = 1000000000 + 7;
const int SIZE = 100005;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    while( true ) {
        int n;
        cin >> n;
        if( n == 0 ) break;

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

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

        }
    }
    return 0;
}

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

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

C++: #include<iostream>
using namespace std;
int main(){
  int n,ice;
 int kind[10];

 for(int i=0;i<10;i++){
   kind[i]=0;}

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

C++: #include<stdio.h>
int main()
{
	int n,i,j,ggg;
	int val[11]={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];
			if(ggg==0)
			{
				printf("-\n");
			}
			else
			{
				for(j=0;j<ggg;j++)
				{
					printf("*");
				}
				puts(" ");
			}
		}
	}	
	return 0;
}

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

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

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

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

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

#define rep(i,n) for(int i=0;i<n;i++)
#define all(c) (c).begin(),(c).end()
#define mp make_pair
#define pb push_back
#define rp(i,c) rep(i,(c).size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e12,EPS=1e-9;

int n,s[10],t;

int main()
{
	while(scanf("%d",&n),n)
	{
		rep(i,10)s[i]=0;
		rep(i,n)scanf("%d",&t),s[t]++;
		rep(i,10)
		{
			if(s[i]==0)putchar('-');
			rep(j,s[i]+1)putchar(j==s[i]?'\n':'*');
		}
	}
	return 0;
}

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

using namespace std;

int main(void){

  int n;
  while( cin >> n , n ){

    int icenum;
    int ice[10] = {0};    

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

    for( int i = 0 ; i < 10 ; i++ ){
      int I = ice[i];
      if(I){
	for( int j = 0 ; j < I ; j++ ){
	  cout << "*";
	    }
      }
      else 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 temp;
            cin >> temp;
            ++a[temp];
        }
        
        for(int i = 0; i < 10; ++i){
            if(a[i] == 0) cout << '-' << endl;
            else {
                for(int j = 0; j < a[i]; ++j){
                    cout << '*';
                }
                cout << endl;
            }
        }
    }
}

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

using namespace std;

typedef unsigned long long ll;

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

ll lcm(ll a,ll b){
	return a*b/gcd(a,b);
}


void div(ll &d,ll &v){
	for(ll i = 2; i <= min(d,v); i++){
		if(d%i==0&&v%i==0){
			d/=i;
			v/=i;
			i=1;
		}
	}
}

int main(){

	ll n;
	while(cin>>n&&n!=0){
		ll d,v;
		vector<ll> ds;
		vector<ll> vs;
		bool oo=false;
		for(ll i = 0; i < n; i++){
			cin>>d>>v;

			div(d,v);


			ds.push_back(d);
			vs.push_back(v);
		}


		ll z=1;
		ll nums[11];
		ll allv=1;
		//for(ll i = 0; i < n; i++){
		//	allv*=vs[i];
		//}

		//for(ll i = 0; i < n; i++){
		//	nums[i]=ds[i]*allv/vs[i];
		//	z=lcm(z,nums[i]);
		//}
		//for(ll i = 0; i < n; i++){
		//	cout<<(z/nums[i])<<endl;
		//}
		bool same=true;
		for(ll i = 1; i < n; i++){
			ll n1=ds[i-1]*vs[i];
			ll n2=ds[i]*vs[i-1];
			ll ret=lcm(n1,n2);
			ll r1=ret/n1;
			ll r2=ret/n2;
			if(ds[i-1]==ds[i]&&vs[i-1]==vs[i]){
				z=lcm(z,1);
				same=true;
			}
			else{
				z=lcm(z,r1*ds[i-1]/vs[i-1]);
				same=false;
			}
		}
		vector<ll> vll;
		ll m;
		if(!same){
			for(ll i = 0; i < n; i++){
				vll.push_back(z*vs[i]/ds[i]);
				if(i==0){
					m=z*vs[i]/ds[i];
				}
				else{
					m=gcd(m,z*vs[i]/ds[i]);
				}
			}
			for(int i = 0; i < n; i++){
				cout<<vll[i]/m<<endl;
			}
		}
		else{
			for(int i = 0; i < n; i++){
				cout<<1<<endl;
			}
		}
	}

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
    int n;
    cin >> n;
    string t[]{0};
    for (int i=0;i<n;++i){
        cin >> t[i]
    }
    for (int i=0;i<1000000000;++i){
        for (int j=0;j<t.find(i);++j){
            cout << '*';
        }
        cout << endl;
    }
    
}