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

using namespace std;

int main() {
  int n, a;
  cin >> n;
  int b[10] = {};
  for (int i = 0; i < n; i++) {
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>
#include<algorithm>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)
class state{
public:
  int p,d;
  bool operator<(const state & a)const{
    if (d != a.d)return d > a.d;
    return p < a.p;
  }
};

main(){
  int n;
  while(cin>>n&&n ){
    rep(i,n){
      int m,e,j;
      cin>>m>>e>>j;
      if (m>=100||e>=100||j>=100||(m+e)>=2*90 ||m+e+j >= 3*80)cout << "A"<<endl;
      else if (m+e+j>= 3*70 || (m+e+j>=3*50 && (m>=80||e>=80)))cout <<"B"<<endl;
      else cout << "C" << endl;
    }
  }
}

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(11);
		rep(i,n){
			int a;
			cin>>a;
			in[a]++;
		}
		loop(i,1,11){
			if(in[i])rep(j,in[i])cout<<"*";
			else cout<<"-";
			cout<<endl;
		}
	}
}

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

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

int main() {
	int n,c;
	cin >> n;
	int hai[10];
	fill(hai,hai + 10,0);
	cout << hai[1] << endl;
	for(int i = 0;i<n;i++){
		cin >> c;
		for(int j = 0;j<10;j++){
			if(c == j)
				hai[j]++;
		}

	}
	for(int i = 0;i<10;i++){
		if(hai[i]!=0){
			 string f(hai[i],'*');
			cout << f << endl;
		}else{
			cout << '-' << endl;
		}
	}


	return 0;
}

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

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

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

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

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

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

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++){
					cout <<"*";
				}
				cout << endl;
			}else {
				cout <<"-" <<endl;
			}
		}

	}


	return 0;
}

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

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

int main(){

  int n,work;
  while(1){
    cin>>n;
    if(n==0) break;
    int array[10];
    
    for(int i=0;i<10;i++)
      array[i]=0;
    
    for(int i=0;i<n;i++){
      cin>>work;
      array[work]++;
    }
    for(int i=0;i<10;i++){
      printData(array[i]);
    }
  }
  
  return 0;
}

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 << '*' << endl;
        }
      }
    }
  }
  return (0);
}

C++: #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
#define EPS 1e-10
using namespace std;
typedef long long llong;
int main() {
	int n;
	while (cin >> n, n) {
		vector<int>v(10, 0);
		int c;
		for (int i = 0; i < n; i++) {
			cin >> c;
			v[c]++;
		}
		for (int i = 0; i < 10; i++) {
			if (v[i]) {
				for (int j = 0; j < v[i]; j++) {
					cout << '*';
				}
				cout << endl;
			}
			else {
				cout << '-' << endl;
			}
		}
	}
	return 0;
}

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

int main(){
	
	int t;
	
	while(cin >> t,t){
		int ice[10]={},i,g,n,p;
		
		for(p=0;p<t;p++){
			cin >> i;
			
			ice[i]++;
		}
		
		for(g=0;g<=9;g++){
			if(ice[g]==0){
				cout << "-" << endl;
			}
			
			else if(ice[g]>0){
				for(n=0;n<ice[g];n++){
					cout << "*";
				}
				
				cout << endl;
			}
		}
	}
	
	return 0;
}

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

#define rep_(v, f, l) for (int v = (f); v < (l); ++v)
#define rep(v, n) rep_(v, 0, n)
#define lep(v, n) rep_(v, 1, n + 1)

using namespace std;

typedef long long int lint;

static inline int in(){ int x; scanf("%d", &x); return x; }
static inline lint inl(){ lint x; scanf("%lld", &x); return x; }

int draw_line(int c)
{
    if (c == 0) return puts("-");
    rep(i, c) printf("*");
    return puts("");
}

int main()
{
    int n;
    while (n = in()){
        int ice[10] = {};
        rep(i, n){
            ice[in()]++;
        }
        rep(i, 10) draw_line(ice[i]);
    }
    return (0);
}

C++: #include<iostream>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

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