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() {
	int n, h[11];
	double a;
	for (int i = 1; i <= 9; i++) {
		h[i] = 0;
	}
	cin >> n;
	for (int i = 1; i <= n; i++) {
		cin >> a;
		if (a < 165) {
			h[1] += 1;
		}
		else {
			if (a < 170) {
				h[2] += 1;
			}
			else {
				if (a < 175) {
					h[3] += 1;
				}
				else {
					if (a < 180) {
						h[4] += 1;
					}
					else {
						if (a < 185) {
							h[5] += 1;
						}
						else {
							h[6] += 1;
						}
					}
				}
			}
		}
	}
	for (int i = 1; i <= 6; i++) {
		cout << i << ":";
		for (int z = 1; z <= h[i]; z++) {
			cout << "*";
		}
		cout << endl;
	}
}

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

int main(){
	int p[5]={0};
	int no=0;
	double n;
	cin >> n;
	while(cin >> n){
		if(n<165){
			no++;
		}else{
			if(n>185.0)n=185.0;
			p[(int)((n-165.0)/5)]++;
		}
	}
	cout << "1:";
	for(int j=0;j<no;j++)
		cout << "*";
	cout << endl;

	for(int i=0;i<5;i++){
		cout << i+2 << ":";
		for(int j=0;j<p[i];j++)
			cout << "*";
		cout << endl;
	}
}

C++: #include<iostream>
#include<vector>
using namespace std;
int main() {
	int n;
	cin >> n;
	int tall[6] = {};
	double x;
	for (int i = 0; i < n; i++) {
		cin >> x;
		if (x < 165.0)tall[0]++;
		else if (165.0 <= x&&x < 170.0)tall[1]++;
		else if (170.0 <= x&&x < 175.0)tall[2]++;
		else if (175.0 <= x&&x < 180.0)tall[3]++;
		else if (180.0 <= x&&x < 185.0)tall[4]++;
		else if (185.0 <= x)tall[5]++;
	}
	for (int i = 0; i < 6; i++) {
		cout << i + 1 << ':';
		for (int j = 0; j < tall[i]; j++)cout << '*';
		cout << endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
#define NUM 6
int main(){
    int n;
    cin >> n;
    int high[] = {165,170,175,180,185,200};
    int a[6] = {};
    for(int i = 0; i < n; i++){
        double h;
        cin >> h;
        for(int j = 0; j < NUM; j++)if(h < high[j]){
            a[j]++;
            break;
        }
    }
    for(int i = 0; i < NUM; i++){
        cout << i+1 << ":";
        for(int j = 0; j < a[i]; j++)cout << "*";
        cout << endl;
    }
}

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

int cnt[6];

int main(void){
  int n;
  cin >> n;
  for(int i = 0; i < n; i++){
    double h;
    cin >> h;
    if(h < 165.0) cnt[0]++;
    else if(h < 170.0) cnt[1]++;
    else if(h < 175.0) cnt[2]++;
    else if(h < 180.0) cnt[3]++;
    else if(h < 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;
  }
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
using namespace std;
typedef long long int ll;

int cnt[6]={};

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    int n; cin >> n;
    for(int i=0;i<n;i++){
        double h; cin >> h;
        if(h<165)cnt[0]++;
        else if(h<170)cnt[1]++;
        else if(h<175)cnt[2]++;
        else if(h<180)cnt[3]++;
        else if(h<185)cnt[4]++;
        else cnt[5]++;
    }
    for(int i=1;i<=6;i++){
        printf("%d:",i);
        for(int j=0;j<cnt[i-1];j++){
            printf("*");
        }
        printf("\n");
    }
}

C++: #include<stdio.h>

int main()
{
int n[8]={},N,x,y;


scanf("%d",&N);
for(int i=0;i<N;i++){
scanf("%d.%d",&x,&y);
if(185<=x)n[6]++;
else if(180<=x)n[5]++;
else if(175<=x)n[4]++;
else if(170<=x)n[3]++;
else if(165<=x)n[2]++;
else if(165>x)n[1]++;
}
for(int i=1;i<=6;i++)
{
printf("%d:",i);
for(int j=0;j<n[i];j++){
printf("*");
}
printf("\n");
}
return 0;
}

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

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

C++: // #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <locale>
#include <cctype>
#include <sstream>	// istringstream
using namespace std;

void Output(vector<int> ans){
	for (int i = 0; i < 6; i++){
		cout << (i + 1) << ":";
		for (int j = 0; j < ans[i]; j++){
			cout << "*";
		}
		cout << endl;
	}
}

int main(){
	int n;
	double in;
	vector<int> ans(7, 0);

	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> in;
		for (int i = 0; i < 6; i++){
			if (in < (165.0 + 5.0*i)){
				ans[i]++;
				break;
			}
		}
		/*
		if (in < 165.0)	ans[0]++;
		else if (in >= 165.0 && in < 170.0)	ans[1]++;
		else if (in >= 170.0 && in < 175.0)	ans[2]++;
		else if (in >= 175.0 && in < 180.0)	ans[3]++;
		else if (in >= 180.0 && in < 185.0)	ans[4]++;
		else			ans[5]++;
		*/
	}
	Output(ans);
	return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int n;
	int i;
	double height[40];
	int count_1=0,count_2=0,count_3=0,count_4=0,count_5=0,count_6=0;
	
	scanf("%d",&n);
	
	for(i=0;i<n;i++)
	{
		scanf("%lf",&height[i]);
	}
	
	for(i=0;i<n;i++)
	{
		if(height[i] < 165.0)
		{
			count_1++;
		}
		else if(height[i] >= 165.0 && 170.0 > height[i])
		{
			count_2++;
		}
		else if(height[i] >= 170.0 && 175.0 > height[i])
		{
			count_3++;
		}
		else if(height[i] >= 175.0 && 180.0 > height[i])
		{
			count_4++;
		}
		else if(height[i] >= 180.0 && 185.0 > height[i])
		{
			count_5++;
		}
		else if(185.0 <= height[i])
		{
			count_6++;
		}
	}
	
	printf("1:");
	for(i=0;i<count_1;i++)
	{
		printf("*");
	}
	printf("\n");
	printf("2:");
	for(i=0;i<count_2;i++)
	{
		printf("*");
	}
	printf("\n");
	printf("3:");
	for(i=0;i<count_3;i++)
	{
		printf("*");
	}
	printf("\n");
	printf("4:");
	for(i=0;i<count_4;i++)
	{
		printf("*");
	}
	printf("\n");
	printf("5:");
	for(i=0;i<count_5;i++)
	{
		printf("*");
	}
	printf("\n");
	printf("6:");
	for(i=0;i<count_6;i++)
	{
		printf("*");
	}
	printf("\n");
	
	return 0;
}