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>

int main() {
	int stu = 0;
	double p[40] = {};
	char dosu[6][40];

	std::cin >> stu;

	for (int i = 0; i < stu; i++) {
		std::cin >> p[i];
		if (p[i] < 165.0) {
			dosu[0][i] = '*';
		
		}
		else if (p[i] < 170.0) {
			dosu[1][i] = '*';
			
		}
		else if (p[i] < 175.0) {
			dosu[2][i] = '*';
			
		}
		else if (p[i] < 180.0) {
			dosu[3][i] = '*';
			
		}
		else if (p[i] < 185.0) {
			dosu[4][i] = '*';
		
		}
		else {
			dosu[5][i] = '*';
		}
		

	}

	std::cout << "1:";
	for (int j1 = 0; j1 < 40; j1++) {

		if (dosu[0][j1] == '*') {
			std::cout << dosu[0][j1];
		}
	}
	std::cout << std::endl;
	std::cout << "2:";
	for (int j2 = 0; j2 < 40; j2++) {
		if (dosu[1][j2] == '*') {
			std::cout << dosu[1][j2];
		}
	}
	std::cout << std::endl;
	std::cout << "3:";
	for (int j3 = 0; j3 < 40; j3++) {
		if (dosu[2][j3] == '*') {
			std::cout << dosu[2][j3];
		}
	}
	std::cout << std::endl;
	std::cout << "4:";
	for (int j4 = 0; j4 < 40; j4++) {
		if (dosu[3][j4] == '*') {
			std::cout << dosu[3][j4];
		}
	}
	std::cout << std::endl;
	std::cout << "5:";
	for (int j5 = 0; j5 < 40; j5++) {
		if (dosu[4][j5] == '*') {
			std::cout << dosu[4][j5];
		}
	}
	std::cout << std::endl;
	std::cout << "6:";
	for (int j6 = 0; j6 < 40; j6++) {
		if (dosu[5][j6] == '*') {
			std::cout << dosu[5][j6];
		}
	}
	std::cout << std::endl;
}

C++: #include<stdio.h>
int main()
{
double N;
int num[41]={},A,B=0;

scanf("%d",&A);
for(int i=0;i<A;i++)
{
scanf("%lf",&N);
B=N*10;
N=B;
if((int)N<165)num[0]++;
else if((int)N>=1650&&(int)N<1700)num[1]++;
else if((int)N>=1700&&(int)N<1750)num[2]++;
else if((int)N>=1750&&(int)N<1800)num[3]++;
else if((int)N>=1800&&(int)N<1850)num[4]++;
else if((int)N>=1850)num[5]++;
else if((int)N>=1650&&(int)N<165)num[6]++;
B=0;
}
for(int i=0;i<6;i++)
{int RR=i+1;
	printf("%d:",RR);
for(int j=0;j<num[i];j++)
printf("*");printf("\n");
}


return 0;
}

C++: #include<iostream>
using namespace std;main(){int r[6]={0},n,l,k;char c;for(cin>>n;n;n--){cin>>l>>c>>k;l>185?l=185:l;l<165?l=160:l;r[l/5-32]++;}for(int i=0;i<6;i++){for(cout<<i+1<<":";r[i];r[i]--)cout<<"*";cout<<endl;}}

C++: #include<iostream>
using namespace std;
#include<algorithm>
using namespace std;
int main(){
    int n;
    cin>>n;
    int cnt[6]={0};
    for(int i=0;i<n;i++){
        double h;
        cin>>h;
        int a=(int)(h*10);
        if(a<1650)cnt[0]++;
        else if(a<1700)cnt[1]++;
        else if(a<1750)cnt[2]++;
        else if(a<1800)cnt[3]++;
        else if(a<1850)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 p[7];

int main(){
	int num;
	float height;
	for(int i=0; i < 8; i++) p[i] = 0;

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

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

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

int main(){
	int x,i,a[7]={},an,aaa;
	double man;
	cin >> x;
	for(i=0;i<x;i++){
		cin >> man;
		if(man<165.0) a[1]++;
		else if(man<170.0) a[2]++;
		else if(man<175.0) a[3]++;
		else if(man<180.0) a[4]++;
		else if(man<185.0) a[5]++;
		else a[6]++;
	}
	
	for(an=1;an<=6;an++){
		cout << an << ':';
		for(aaa=1;aaa<=a[an];aaa++){
			cout << '*';
		}
		cout << endl;
	}
	
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(void)
{
	double date[7]={0,165,170,175,180,185,2000};
	int n;
	cin >> n;
	int freq[7]={0};
	while(n--){
		double height;
		cin >> height;
		for(int i=1;i<7;i++){
			if(date[i-1]<=height&&height<date[i]){
				freq[i]++;
				break;
			}
		}
	}
	for(int i=1;i<7;i++){
		cout << i << ":";
		for(int j=0;j<freq[i];j++){
			cout << "*";
		}
		cout << "\n";
	}
	return 0;
}

C++: //22
#include<iostream>
#include<string>

using namespace std;

int main(){
  int his[6]={};
  int n;
  cin>>n;
  for(int i=0;i<n;i++){
    double h;
    cin>>h;
    his[int((h-160)/5)]++;
  }
  for(int i=0;i<6;i++){
    cout<<i+1<<':'<<string(his[i],'*')<<endl;
  }
  return 0;
}

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

using namespace std;

int main()
{
	int n;
	double num;
	int list[100]={};
	cin >> n;
	while(n--)
	{
		cin >> num;

		if(num<165)list[0]++;
		else if(num<170)list[1]++;
		else if(num<175)list[2]++;
		else if(num<180)list[3]++;
		else if(num<185)list[4]++;
		else list[5]++;
	}    

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

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

#define rep(i,n) for(int i = 0; i < n; i++)
#define ll long long
#define EPS 1.0e-8
#define MAX_N 100
typedef pair<int,int> P;

int main(){
	int n;
	double h;
	int cnt[6] = {};

	cin >> n;
	rep(i, n){
		cin >> h;
		if(h < 165.0) cnt[0]++;
		else if(h >= 165.0 && h < 170.0) cnt[1]++;
		else if(h >= 170.0 && h < 175.0) cnt[2]++;
		else if(h >= 175.0 && h < 180.0) cnt[3]++;
		else if(h >= 180.0 && h < 185.0) cnt[4]++;
		else if(h >= 185.0) cnt[5]++;

	}


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

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

int main(void){
	int n;
	double lo;
	int num[6]={0};
	cin>>n;

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

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

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

C++: #include<cstdio>
//#include<algorithm>
//#include<functional>
using namespace std;
int main(void)
{
	int n,i,x,j,p;
	int suu[6];
	float sin[41];
	scanf("%d",&n);
	x=0;
	p=0;
	for(i=0;i<n;i++){
		scanf("%f",&sin[i]);
		
	}
	for(i=0;i<6;i++){
		suu[i]=0;
	}
	//sort(sin,sin+41);
	for(i=0;i<n;i++){
		if(sin[i]<165){
			suu[0]++;
		}
		else if(sin[i]>=165 && sin[i]<170){
			suu[1]++;
		}
		else if(sin[i]>=170 && sin[i]<175){
			suu[2]++;
		}
		else if(sin[i]>=175 && sin[i]<180){
			suu[3]++;
		}
		else if(sin[i]>=180 && sin[i]<185){
			suu[4]++;
		}
		else if(sin[i]>=185){
			suu[5]++;
		}
	}
	for(i=0;i<6;i++){
		x++;
		p=suu[i];
		printf("%d:",x);
		if(p!=0){
			for(j=0;j<p;j++){
				printf("*");
			}
		}
		printf("\n");
	}
	return 0;
}