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 <iostream>
#include<stdio.h>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;

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

C++: #include<iostream>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<cstdio>
#include<cstdlib>
using namespace std;
#define REP(i,a,n) for(int i = a ; i < n ; i++)
#define rep(i,n) REP(i,0,n)

typedef long long ll;

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

  int cnt[6];
  memset(cnt,0,sizeof(cnt));

  rep(i,n){
    double x;
    cin>>x;
    if(x < 165) cnt[0]++;
    else if(x < 170) cnt[1]++;
    else if(x < 175) cnt[2]++;
    else if(x < 180) cnt[3]++;
    else if(x < 185) cnt[4]++;
    else cnt[5]++;
  }

  rep(i,6){
    cout<<i+1<<":";
    rep(j,cnt[i]){
      cout<<"*";
    }
    cout<<endl;
  }
}

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

int main(){
  int n;
  int cnt[6]={0};
  cin >> n;
  for(int i=0;i<n;i++){
    double num; cin >> num;
    if(num < 165.0) cnt[0]++;
    else if(num < 170.0) cnt[1]++;
    else if(num < 175.0) cnt[2]++;
    else if(num < 180.0) cnt[3]++;
    else if(num < 185.0) cnt[4]++;
    else 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<iostream>
using namespace std;
int n;
double t[6]={165.0,170.0,175.0,180.0,185.0,9999999.9};
int cnt[6];
double in;
int main(){
  for(int i=0;i<6;i++)cnt[i]=0;
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>in;
    for(int j=0;j<6;j++){
      if(in<t[j]){cnt[j]++;break;}
    }
  }
  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>
#include <array>
#include <string>
#include <cmath>

int main() {
    std::array<int, 7> cnt_rank{};
    int n;

    std::cin >> n;

    for (; n--;) {
        double height;
        std::cin >> height;
        
        height -= 165.;
        
        if (height < 0) {
            ++cnt_rank[0];
        }
        else {
            int rank;
            rank = std::min((int)(height / 5 + 1), 6);

            ++cnt_rank[rank];
        }
    }
    
    for (int i = 0; i < 6; ++i) {
        std::cout << i + 1 << ":" << std::string(cnt_rank[i], '*')
                  << std::endl;
    }
    
    return 0;
}

C++: //
//  main.cpp
//  suira
//
//  Created by h3038178 on 2018/12/13.
//
//

#include <iostream>
#include<stdio.h>
#include<string>
using namespace std;
int main(int argc, const char * argv[]) {
    
    int n,a=0,b=0,c=0,d=0,e=0,f=0;
    double h;
    string x,y,z,w,m,k;
    cin>>n;
    
    for(int i=0;i<n;i++){
        cin>>h;
        if(h<165){a=a+1;}
        else if(165<=h&&h<170){b=b+1;}
        else if(170<=h&&h<175){c=c+1;}
        else if(175<=h&&h<180){d=d+1;}
        else if(180<=h&&h<185){e=e+1;}
        else if(185<=h){f=f+1;}
    }
    for(int i=0;i<a;i++){x=x+"*";}
    for(int i=0;i<b;i++){y=y+"*";}
    for(int i=0;i<c;i++){z=z+"*";}
    for(int i=0;i<d;i++){w=w+"*";}
    for(int i=0;i<e;i++){m=m+"*";}
    for(int i=0;i<f;i++){k=k+"*";}
    cout<<"1:"<<x<<endl;
    cout<<"2:"<<y<<endl;
    cout<<"3:"<<z<<endl;
    cout<<"4:"<<w<<endl;
    cout<<"5:"<<m<<endl;
    cout<<"6:"<<k<<endl;
    
    
    return 0;
}

C++: #include <iostream>

using namespace std;

int main() {

  int n;
  double h;

  int dist[6];


  cin >> n;

  for(int i=0;i<6;i++) dist[i]=0;

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

    cin >> h;

    if(h<165.0) dist[0]++;

    else if(h<170.0) dist[1]++;

    else if(h<175.0) dist[2]++;

    else if(h<180.0) dist[3]++;

    else if(h<185.0) dist[4]++;

    else dist[5]++;

  }

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

    cout << i+1 << ":";

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

    cout << endl;

  }

  return 0;

}

C++: #include <iostream>
#include <fstream>
#include <typeinfo>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <iomanip>
#include <cctype>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<25;
const double pi=acos(-1);
const double eps=1e-8;
const vi emp;

int n;
vi a(6);

int main(){
	cin>>n;
	double t;
	for(int i=0;i<n;i++){
		cin>>t;
		if(t<165) a[0]++;
		else if(t<170) a[1]++;
		else if(t<175) a[2]++;
		else if(t<180) a[3]++;
		else if(t<185) 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;
	}
}

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

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

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

using namespace std;

int main(){
  int n;
  double l;
  int cunt[6]={0},c=0;

  cin>>n;
  while(1){
    cin>>l;
    if(l<165.0)
      cunt[0]++;
    else if(165.0<=l && l<170.0)
      cunt[1]++;
    else if(170.0<=l && l<175.0)
      cunt[2]++;
    else if(175.0<=l && l<180.0)
      cunt[3]++;
    else if(180.0<=l && l<185.0)
      cunt[4]++;
    else if (185.0<=l)
      cunt[5]++;

    if(c==n-1)
      break;
    c++;
  }

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

  return 0;
}