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 <vector>
#include <list>
#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>
#include <cassert>
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)
#define EACH(t,i,c) for(t::iterator i=(c).begin(); i!=(c).end(); ++i)
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int main() {
	int n;
	cin>>n;
	vi a(6);
	REP(i,n){
		double b;
		cin>>b;
		if(b<165.0){
			a[0]++;
		}else if(b<170.0){
			a[1]++;
		}else if(b<175.0){
			a[2]++;
		}else if(b<180.0){
			a[3]++;
		}else if(b<185.0){
			a[4]++;
		}else{
			a[5]++;
		}
	}
	REP(i,6){
		cout<<i+1<<":";
		REP(j,a[i]){
			cout<<"*";
		}
		cout<<endl;
	}

}

C++: #include <iostream>
using namespace std;
int main(){
  int n;
  int stu[100] = {0};
  cin >> n;
  while(n-- ){
    double h;
    cin >> h;
    if(h < 165.0){
      stu[0]++; 
    }else if(h < 170.0){
      stu[1]++;
    }else if(h < 175.0){
      stu[2]++;
    }else if(h < 180.0){
      stu[3]++;
    }else if(h < 185.0){
      stu[4]++;
    }else stu[5]++;
  }

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

  return 0;
}

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

int main(){
	int n;

	cin >> n ;
	int f[6] = {};
	for(int i=0 ; i<n ; ++i ){
		double a;
		cin >> a;
		if( a < 165.0 )
			f[0]++;
		else if( a < 170.0 )
			f[1]++;
		else if( a < 175.0 )
			f[2]++;
		else if( a < 180.0 )
			f[3]++;
		else if( a < 185.0 )
			f[4]++;
		else
			f[5]++;
	}
	for(int i=0 ; i<6 ; ++i ){
		cout << i+1 << ":";
		for(int j=0 ; j<f[i] ; ++j){
			cout << "*";
		}
		cout << endl;
	}
}

C++: #include<iostream>
using namespace std;
int main(){
	int rank[6], n;
	double body_length;
	cin >> n;
	for(int i=0; i<6; i++)
		rank[i] = 0;
	
	for(int i=0; i<n; i++){
		cin >> body_length;
		if(body_length < 165)
			rank[0]++;
		if(body_length >= 165 && body_length < 170)
			rank[1]++;
		if(body_length >= 170 && body_length < 175)
			rank[2]++;
		if(body_length >= 175 && body_length < 180)
			rank[3]++;
		if(body_length >= 180 && body_length < 185)
			rank[4]++;
		if(body_length >= 185)
			rank[5]++;
	}
	
	for(int i=0; i<6; i++){
		cout << i+1 << ":";
		for(int j=0; j<rank[i]; j++)
			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(){
long n,aa[6]={0},i,j;
double a;
cin>>n;
for(i=0;i<n;i++){
cin >>a;
if(a<165)aa[0]++;
else if(a<170)aa[1]++;
else if(a<175)aa[2]++;
else if(a<180)aa[3]++;
else if(a<185)aa[4]++;
else aa[5]++;
}
for(j=0;j<6;j++){
cout<<j+1<<":";for(i=0;i<aa[j];i++)cout<<"*";cout<<endl;
}
return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>

using namespace std;

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

static const double eps = 10e-9;

int main(){
	int n;
	double table[]={165.0,170.0,175.0,180.0,185.0};
	int hist[] = {0,0,0,0,0,0};
	while(~scanf("%d",&n)){
		for(int i=0;i<n;i++){
			double tall;
			scanf("%lf",&tall);
			int idx=5;
			for(int j=0;j<sizeof(table)/sizeof(double);j++){
				if(table[j] > tall){
					idx = j;
					break;
				}
			}
			hist[idx]++;
		}

		for(int i=0;i<sizeof(hist)/sizeof(int);i++){
			printf("%d:",i+1);
			for(int j=0;j<hist[i];j++){
				cout << "*";
			}
			cout << endl;
		}
	}
}

C++: #include <iostream>
using namespace std;
int main(void)
{
  int n;
  double std[40];
  int range[6]={0};

  cin >> n;
  
  for(int i = 0 ; i < n ; i++) {
    cin >> std[i];
    if(std[i] < 165.0) range[0]++;
    else if(std[i] >= 165.0 && std[i] < 170.0) range[1]++;
    else if(std[i] >= 170.0 && std[i] < 175.0) range[2]++;
    else if(std[i] >= 175.0 && std[i] < 180.0) range[3]++;
    else if(std[i] >= 180.0 && std[i] < 185.0) range[4]++;
    else if(std[i] >= 185.0) range[5]++;
  }
  
  for(int i = 0 ; i < 6 ; i++) {
      cout << i+1 << ':';
      while(range[i] != 0) {
	cout << '*';
	range[i]--;
      }
      cout << endl;
  }
  return 0;
}

C++: #include<iostream>
#include<string.h>
#include<vector>
#include<list>
#include<stdio.h>
#include<math.h>
#include<iomanip>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << "debug " << x << endl;
using namespace std;

int main(){
    int n;
    double h;
    while(cin >> n){
        int ans[6] = {0};
        rep(i,n){
            cin >> h;
            if(h < 165)
                ans[0]++;
            else if(h >= 165 && h < 170)
                ans[1]++;
            else if(h >= 170 && h < 175)
                ans[2]++;
            else if(h >= 175 && h < 180)
                ans[3]++;
            else if(h >= 180 && h < 185)
                ans[4]++;
            else if(h >= 185)
                ans[5]++;
        }
        rep(i,6){
            cout << i + 1 << ":";
            rep(j,ans[i]){
                cout << '*';
            }
            cout << endl;
        }
    }
}

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

int main(){
  int n,b[6]={};
  cin >> n;
  for(int i = 0; i < n; i++){
    double h;
    cin >> h;
    if( h < 165 ) b[0]++;
    if( 165 <= h && h < 170 ) b[1]++;
    if( 170 <= h && h < 175 ) b[2]++;
    if( 175 <= h && h < 180 ) b[3]++;
    if( 180 <= h && h < 185 ) b[4]++;
    if( h >= 185 ) b[5]++;
  }
  for(int i = 0; i < 6; i++){
    cout << i+1 << ":";
    for(int j = 0; j < b[i]; j++){
      cout << "*";
    }
    cout << endl;
  }
  return 0;
}