Go: package main

import (
	"bufio"
	"os"
	"strconv"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	result := make([]int, 6)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	for i := 0; i < n; i++ {
		scanner.Scan()
		h, _ := strconv.ParseFloat(scanner.Text(), 64)
		if h < 165.0 {
			result[0]++
		} else if 165.0 <= h && h < 170.0 {
			result[1]++
		} else if 170.0 <= h && h < 175.0 {
			result[2]++
		} else if 175.0 <= h && h < 180.0 {
			result[3]++
		} else if 180.0 <= h && h < 185.0 {
			result[4]++
		} else if 185.0 <= h {
			result[5]++
		}
	}
	for i := 0; i < 6; i++ {
		fmt.Printf("%d:", i+1)
		for j := 0; j < result[i]; j++ {
			fmt.Print("*")
		}
		fmt.Println()
	}
}

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

using namespace std;

int main() {
  int Tc;
  double arr[6] = {}, x;
  cin >> Tc;
  while(Tc--) {
    cin >> x;
    if(x < 165.0) arr[0] ++;
    else if(x < 170.0) arr[1] ++;
    else if(x < 175.0) arr[2] ++;
    else if(x < 180.0) arr[3] ++;
    else if(x < 185.0) arr[4] ++;
    else arr[5] ++;
  }
  
  for(int i=0; i<6; i++) {
    cout << i+1 << ":";
    for(int j=0; j<arr[i]; j++) {
      cout << '*';
    }
    cout << endl;
  }
  
  return 0;
}

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
using namespace std;
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str();}
typedef vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n-1)
const double EPS = 1e-10;
const double PI = acos(-1.0);

int main() {
	int n;
	double h;
	vi data(6);

	cin >> n;
	REP(i, n) {
		cin >> h;
		if(h < 165.0) {
			data[0]++;
		} else if(h < 170.0) {
			data[1]++;
		} else if(h < 175.0) {
			data[2]++;
		} else if(h < 180.0) {
			data[3]++;
		} else if(h < 185.0) {
			data[4]++;
		} else {
			data[5]++;
		}
	}

	REP(i, 6) {
		cout << i+1 << ':';
		REP(j, data[i]) {
			cout << '*';
		}
		cout << endl;
	}

	return 0;
}

C++: #include<stdio.h>

int main(){
	int n,sin[6],i;
	double length;
	
	while(0<=scanf("%d",&n)){
		for(i=0;i<6;i++){
			sin[i]=0;
		}
		
		for(i=0;i<n;i++){
			scanf("%lf",&length);
			if(length<165){
				++sin[0];
			}else if(length<170){
				++sin[1];
			}else if(length<175){
				++sin[2];
			}else if(length<180){
				++sin[3];
			}else if(length<185){
				++sin[4];
			}else{
				++sin[5];
			}
		}
		
		for(i=0;i<6;i++){
			printf("%d:",i+1);
			while(sin[i]>0){
				printf("*");
				--sin[i];
			}
			printf("\n");
		}
	}
	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(){
	double h[6]={165.0,170.0,175.0,180.0,185.0,1e9};
	int n;
	cin>>n;
	vector<int>out(6);
	while(n--){
		double a;
		cin>>a;
		rep(i,6)if(a<h[i]){out[i]++;break;}
	}
	rep(i,6){
		cout<<i+1<<":";
		rep(j,out[i])cout<<"*";
		cout<<endl;
	}	
}

C++: #include<iostream>
using namespace std;
int n, w[7], b;
double a;
int main() {
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a;
		b = (a - 155.0) / 2;
		if (b < 1) { b = 1; }
		if (b > 6) { b = 6; }
		w[b]++;
	}
	for (int i = 1; i <= 6; i++) {
		cout << i << ':';
		for (int j = 0; j < w[i]; j++) {
			cout << '*';
		}
		cout << endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){

	int i, n;
	double high;
	int num[6];

	 memset(num, 0, sizeof(num));

	cin >> n;

	for(i = 0; i < n; i++){
		cin >> high;

		if(high < 165.0){
			num[0]++;
		}

		else if(high >= 165.0 && high < 170.0){
			num[1]++;
		}

		else if(high >= 170.0 && high < 175.0){
			num[2]++;
		}

		else if(high >= 175.0 && high < 180.0){
			num[3]++;
		}

		else if(high >= 180.0 && high < 185.0){
			num[4]++;
		}

		else{
			num[5]++;
		}
	}

	cout << "1:";
		for(i = 0; i < num[0]; i++){
			cout << "*";
		}
		cout << endl;

		cout << "2:";
		for(i = 0; i < num[1]; i++){
			cout << "*";
		}
		cout << endl;

		cout << "3:";
		for(i = 0; i < num[2]; i++){
			cout << "*";
		}
		cout << endl;

		cout << "4:";
		for(i = 0; i < num[3]; i++){
			cout << "*";
		}

		cout << "5";
		for(i = 0; i < num[4]; i++){
			cout << "*";
		}
		cout << endl;

		cout << "6:";
		for(i = 0; i < num[5]; i++){
			cout << "*";
		}
		cout << endl;

		
		return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,i,x,p,j;
	int sin[6];
	float a[41];
	x=0;
	p=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%f",&a[i]);
	}
	for(i=1;i<=6;i++){
		sin[i]=0;
	}
	for(i=0;i<n;i++){
		if(165>a[i]){
			sin[1]++;
		}
		else if(165<=a[i] && a[i]<170){
			sin[2]++;
		}
		else if(170<=a[i] && a[i]<175){
			sin[3]++;
		}
		else if(175<=a[i] && a[i]<180){
			sin[4]++;	
		}
		else if(180<=a[i] && a[i]<185){
			sin[5]++;
		}
		else if(185<=a[i]){
			sin[6]++;
		}
	}
	for(i=1;i<=6;i++){
		x++;
		p=sin[i];
		printf("%d:",x);
		if(p!=0){
			for(j=1;j<=p;j++){
				printf("*");
			}
		}
		printf("\n");
	}
	return 0;
}

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

int main(){
  int n;
  int cnt[6] = {};
  double s;

  cin >> n;
  for(int i=0;i<n;i++){
    cin >> s;
    double t = 165;
    bool f = false;
    for(int j=0;j<5;j++){
      if(!f && s<t){
	cnt[j]++;
	f = true;
      }
      t += 5;
    }
    if(!f)cnt[5]++;
  }

  for(int i=0;i<6;i++){
    cout << i+1 << ":";
    for(int j=0;j<cnt[i];j++)cout << "*";
    cout << endl;
  }
}

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

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int data[10];

int main() {
	int n;
	n=in();
	while(n--){
		double shin;
		cin>>shin;
		if(shin<165)data[1]++;
		else if(shin<170)data[2]++;
		else if(shin<175)data[3]++;
		else if(shin<180)data[4]++;
		else if(shin<185)data[5]++;
		else data[6]++;
	}
	int i;
	for(i=1;i<=6;i++){
		cout<<i<<":";
		for(;data[i]--;)cout<<"*";
		cout<<endl;
	}
	return 0;
}

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

int main(){
    double t;
    int n,h;
    vector<int> f(6,0);
    cin>>n;
    for(;n--;){
        cin>>t;
        if(t<165.0) h = 0;
        else h = ((int)t-160)/5;
        if(h>5)h=5;
        f[h]++;
    }
    for(n=0;n<6;n++){
        cout<<n+1<<":";
        while(f[n]--) cout<<"*";
        cout<<endl;
    }
    return 0;
}

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

int main() {
  int n;
  cin >> n;
  int a[6] = {0};
  while(n--) {
    double h;
    cin >> h;
    a[max(0, min(5, ((int)(h*10)-1600)/50))] += 1;
  }
  for(int i = 0; i < 6; ++i) {
    cout << i+1 << ":" << string(a[i], '*') << endl;
  }
  return 0;
}