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>
using namespace std;
int main(void){
    double n,h,count1=0,count2=0,count3=0,count4=0,count5=0,count6=0;
    cin >> n;
    for(int a=0; a<n; a++){
        cin >> h;
        if(h<165.0)                 count1+=1;
        else if(165.0<=h&&h<170.0)  count2+=1;
        else if(170.0<=h&&h<175.0)  count3+=1;
        else if(175.0<=h&&h<180.0)  count4+=1;
        else if(180.0<=h&&h<185.0)  count5+=1;
        else if(185.0<=h)           count6+=1;
    }
    cout << "1:";
    for(int b=0; b<count1; b++){
        cout << "*";
    }
    cout << endl;
    cout << "2:";
    for(int c=0; c<count2; c++){
        cout << "*";
    }
    cout << endl;
    cout << "3:";
    for(int d=0; d<count3; d++){
        cout << "*";
    }
    cout << endl;
    cout << "4:";
    for(int e=0; e<count4; e++){
        cout << "*";
    }
    cout << endl;
    cout << "5:";
    for(int f=0; f<count5; f++){
        cout << "*";
    }
    cout << endl;
    cout << "6:";
    for(int g=0; g<count6; g++){
        cout << "*";
    }
    cout << endl;
}

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

int main() {
	int num[6]={0};
	int n; cin >> n ;
	for(int i=0;i<n;i++){
		double tmp; cin >> tmp;
		if(tmp<165.0) num[0]++;
		else if(tmp>=185) num[5]++;
		else num[(int)((tmp-165)/5)+1]++;
	}
	for(int i=0;i<6;i++){
		cout << i+1 << ':' ;
		for(int j=0;j<num[i];j++) cout << '*' ;
		cout << '\n' ;
	}
}

C++: #include <iostream>
#include <cstdio>

using namespace std;

int main(){
	int n;
	int a[6]={0};
	
	cin >> n;

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

	return 0;
}