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

int cs[7] = {0};
int main(){
	int n;
	double h;
	scanf("%d",&n);
	for(int i = 0; i < n; i++){
		scanf("%lf",&h);
		if(h < 165){
			cs[1]++;
		}
		else if(h >= 185){
			cs[6]++;
		}
		else{
			cs[(int)((h-155)/5)]++;
		}
	}
	for(int i = 1; i <= 6; i++){
		printf("%d:",i);
		for(int j = 0; j < cs[i]; j++){
			printf("*");
		}
		printf("\n");
	}
	return 0;
}

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

int n, a[6];

int main(){
	scanf("%d", &n);
	for(int i = 0; i < n; i++){
		double height;
		scanf("%lf", &height);
		if(height < 165.0) a[0]++;
		else if(height < 170.0) a[1]++;
		else if(height < 175.0) a[2]++;
		else if(height < 180.0) a[3]++;
		else if(height < 185.0) a[4]++;
		else a[5]++;
	}
	for(int i = 0; i < 6; i++){
		printf("%d:", i+1);
		for(int j = 0; j < a[i]; j++) printf("*");
		printf("\n");
	}
}

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

int main() {
	int i,j,n,g[6]={0,0,0,0,0,0};
	double h;
	cin >> n;
	for (i=0;i<n;i++) {
		cin >> h;
		if (h<165) g[0]++; else if (h>=185) g[5]++; else g[(int)((h-165)/5)+1]++;
	}
	for (i=0;i<6;i++) {
		cout << i+1 << ':';
		if (g[i]>0) for (j=0;j<g[i];j++) cout << '*';
		cout << endl;
	}
	return 0;
}

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

using namespace std;

int main()
{
  int n;
  cin>>n;

  int data[6] ={0};

  for(int i = 0;i < n;++i){
    double height;
    cin>>height;

    if(height < 165.0){
      ++data[0];
    }
    else if(165.0 <= height && height < 170.0){
      ++data[1];
    }
    else if(170.0 <= height && height < 175.0){
      ++data[2];
    }
    else if(175.0 <= height && height < 180.0){
      ++data[3];
    }
    else if(180.0 <= height && height < 185.0){
      ++data[4];
    }
    else{
      ++data[5];
    }
  }
  
  int N = 6;
  for(int i = 0;i < N;++i){
    cout<<i+1<<":";

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

    cout<<endl;
  }
  
  return 0;
}

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


using namespace std;


int main()
{
	int n, a[6] = {0};
	double h;

	ios::sync_with_stdio(false);

	cin >>n;

	for (int i = 0; i != n; ++i)
	{
		cin >> h;
		if (h < 165.0)
		{
			++a[0];
		}
		else if (h < 170.0)
		{
			++a[1];
		}
		else if (h < 175.0)
		{
			++a[2];
		}
		else if (h < 180.0)
		{
			++a[3];
		}
		else if (h < 185.0)
		{
			++a[4];
		}
		else
		{
			++a[5];
		}
	}

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

	return 0;

}

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
const ld eps = 1e-9;

//// < "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\b.txt"


int main() {
	int N; cin >> N;
	vector<int>nums(6);
	for (int i = 0; i < N; ++i) {
		ld num; cin >> num;
		num += 0.001;
		
		for (int j = 0; j <6; ++j) {
			if (num < 165 + j * 5) {
				nums[j]++;
				break;
			}
		}

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

C++: #include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm>
#include <numeric>
#include <typeinfo>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <ctime>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": #"<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define foreach(i,c) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

int main()
{
	int n;
	cin>>n;
	vi hist(6);
	rep(i,n){
		int a,b;
		scanf("%d.%d",&a,&b);
		int h=a*10+b;
		if(h<1650)
			hist[0]++;
		else if(h<1700)
			hist[1]++;
		else if(h<1750)
			hist[2]++;
		else if(h<1800)
			hist[3]++;
		else if(h<1850)
			hist[4]++;
		else
			hist[5]++;
	}
	rep(i,6){
		printf("%d:",i+1);
		rep(j,hist[i])
			putchar('*');
		puts("");
	}
	
	return 0;
}

C++: #include <iostream>
using namespace std;
int main() {
  int n, cnt[6] = {};
  double in; int temp;

  cin >> n;
  for(int i = 0; i < n; i++) {
    cin >> in;
    in -= 165;
    if(in < 0) cnt[0]++;
    else {
      temp = in;
      cnt[temp/5+1]++;
    }
  }
  
  for(int i = 0; i < 6; i++) {
    cout << i+1 << ":";
    for(int j = 0; j < cnt[i]; j++) cout << "*";
    cout << endl;
  }
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int n; //生徒の数
    double h; //生徒の慎重

    int c1 = 0, c2 = 0, c3 = 0, c4 = 0, c5 = 0, c6 = 0;
    /*
      c1は165.0cm未満の生徒数
      c2は165.0cm以上170.0cm未満の生徒数
      c3は170.0cm以上175.0cm未満の生徒数
      c4は175.0cm以上180.0cm未満の生徒数
      c5は180.0cm以上185.0cm未満の生徒数
      c6は185.0cm以上の生徒数
    */

    cin >> n;
    for(int i = 1; i <= n; i++){
        cin >> h;

        if(h < 165.0) c1++;
        else if(165.0 <= h && h < 170.0) c2++;
        else if(170.0 <= h && h  < 175.0) c3++;
        else if(175.0 <= h && h  < 180.0) c4++;
        else if(180.0 <= h && h  < 185.0) c5++;
        else c6++;
    }

    cout << "1:";
    if(c1 > 0){
        for(int i = 1; i <= c1; i++)
            cout << '*';
    }
    cout << endl;

    cout << "2:";
    if(c2 > 0){
        for(int i = 1; i <= c2; i++)
            cout << '*';
    }
    cout << endl;

    cout << "3:";
    if(c3 > 0){
        for(int i = 1; i <= c3; i++)
            cout << '*';
    }
    cout << endl;

    cout << "4:";
    if(c4 > 0){
        for(int i = 1; i <= c4; i++)
            cout << '*';
    }
    cout << endl;

    cout << "5:";
    if(c5 > 0){
        for(int i = 1; i <= c5; i++)
            cout << '*';
    }
    cout << endl;

    cout << "6:";
    if(c6 > 0){
        for(int i = 1; i <= c6; i++)
            cout << '*';
    }
    cout << endl;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
#include<functional>
using namespace std;

signed main(){
	int N,cnt[6]={};
	cin>>N;
	for(int i=0;i<N;i++){
		double H; cin>>H;
		int c;
		if(H<165.0) c = 0;
		else if(H>=185) c = 5;
		else c = (H-165.0)/5.0+1;
		cnt[c]++;
	}
	for(int i=0;i<6;i++){
		printf("%d:",i+1);
		for(int j=0;j<cnt[i];j++) printf("*"); puts("");
	}
	return 0;
}