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>
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>
#include <algorithm>
#include<vector>
#include <queue>
using namespace std;
int h[11] = {0};
int main()
{
	while(1){
		int n;
		cin >> n;
		if (n == 0)break;
		int a;
		for (int i = 1; i <= n; i++) {
			cin >> a;
			h[a]++;
		}
		for (int i = 0; i <= 9; i++) {
			if (h[i] == 0)cout << "-";
			for (int j = 1; j <= h[i]; j++) {
				cout << "*";
			}
			h[i] = 0;
			cout << endl;
		}
		
	}
}

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

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

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

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

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

   return 0;
}

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

int main(){

	int n;

	while (cin >> n && n != 0){

		int kind[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

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

			int k;
			cin >> k;
			kind[k]++;
		}

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

			if (kind[i] != 0){

				for (int j = 0; j < kind[i]; j++){
					cout << '*';
				}
			}

			else cout << '-';

			cout << endl;
		}
	}
}

C++: #include<iostream>
#include<cstdio>
#include <cstring>
#include<map>
#include<string>
#include<stack>
#include <sstream>
#include<vector>
using namespace std;


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

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

C++: //============================================================================
// Name        : AOJ.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <cstdio>
#include <string>
#include <cctype>
using namespace std;

int main() {
	int n,s;
	int T[10];
	while(1){
		for(int i=0;i<10;i++){
			T[i]=0;
		}
		cin>>n;
		if(n==0)break;
		for(int i=0;i<n;i++){
			cin>>s;
			T[s]+=1;

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

	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<time.h>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	int n;
	while(cin>>n,n){
		vector<int>in(10);
		rep(i,n){
			int a;
			cin>>a;
			in[a]++;
		}
		rep(i,10){
			if(in[i])rep(j,in[i])cout<<"*";
			else cout<<"-";
			cout<<endl;
		}
	}
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <iterator>
#include <bitset>
#include <complex>
#include <fstream>
#include <iomanip>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }

int main()
{
	int n;
	while(cin >> n && n)
	{
		vint v(10, 0);

		rep(i, n)
		{
			int d;
			cin >> d;

			v[d]++;
		}

		rep(i, 10)
		{
			if(v[i]) rep(j, v[i]) cout << "*";
			else cout << "-";

			cout << endl;
		}
	}
}

C++: #include<bits/stdc++.h>

using namespace std;

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

#define INF 2<<29
#define F first
#define S second

int main(){
  int n;
  int cnt[10005]={};

  while(1){
    scanf("%d",&n);
    if(n==0) break;

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<cstring>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
#define all(n) n.begin(),n.end()

const int MAX = 10;

int main()
{
    int n;
    while(cin >> n && n)
    {
        int ice[MAX] = {};
        int t;
        REP(n){cin >> t; ice[t]++;}

        REP(MAX){ rep(j,ice[i]) cout << "*"; if(ice[i] == 0) cout << "-"; cout << endl;}

    }
    return 0;
}

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

#define for_(i,a,b) for(int i=(a);i<(b);++i)

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

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<queue>
#include<string>
#include<cmath>
#include<cstring>
using namespace std;

int main(){
  double n,temp;

  while(1){
    scanf("%lf",&n);
    if(n<0) break;

    if((int)(n*10000)%625!=0) printf("NA\n");
    else{
      for(int i=7;i>=-4;i--){
	temp=pow(2,(double)i);
	if(n>=temp){
	  n-=temp;
	  printf("1");
	}else{
	  printf("0");
	}
	if(i==0) printf(".");
      }
      printf("\n");
    }
  }
  return 0;
}