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

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

int main(){
  int n,i,j,c1,c2,c3,c4,c5,c6;
  double h;

  while(cin >> n){
    c1=0;
    c2=0;
    c3=0;
    c4=0;
    c5=0;
    c6=0;

    for(i=0;i<n;i++){
      cin >> h;
      if(h<165.0)c1++;
      else if(h>=165.0 && 170.0>h)c2++;
      else if(h>=170.0 && 175.0>h)c3++;
      else if(h>=175.0 && 180.0>h)c4++;
      else if(h>=180.0 && 185.0>h)c5++;
      else if(h>=185.0)c6++;
    }

    printf("1:");
    for(i=0;i<c1;i++)printf("*");
    cout << endl;
 printf("2:");
    for(i=0;i<c2;i++)printf("*");
    cout << endl;
 printf("3:");
    for(i=0;i<c3;i++)printf("*");
    cout << endl;
 printf("4:");
    for(i=0;i<c4;i++)printf("*");
    cout << endl;
 printf("5:");
    for(i=0;i<c5;i++)printf("*");
    cout << endl;
 printf("6:");
    for(i=0;i<c6;i++)printf("*");
    cout << endl;




  }
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <stack>
#include <queue>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;

#define rep(i,n) for(int i=0; i<(n); i++)
#define repc(i,s,e) for(int i=(s); i<(e); i++)
#define pb(n) push_back((n))
#define mp(n,m) make_pair((n),(m))
#define all(r) r.begin(),r.end()
#define fi first
#define se second

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;




int main() {
	int n;
	double d;
	vi v(6, 0);
	double a[5] = { 165.0,170.0,175.0,180.0,185.0 };
	cin >> n;
	rep(i, n) {
		cin >> d;
		for (int i = 0; i < 5; i++) {
			if (d < a[i]) {
				v[i] += 1;
				break;
			}
			if (i == 4)v[5] += 1;
		}
	}
	/*for (int i = 0; i < 6; i++) {
		cout << i << ":" << v[i] << endl;
	}*/
	for (int i = 1; i < 7; i++) {
		cout << i << ":";
		for (int j = 0; j < v[i - 1]; j++) {
			cout << "*";
		}
		cout << endl;
	}
}

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

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int n;
  cin >> n;
  int cnt[6] = {};
  for (int i = 0; i < n; i++) {
    double h;
    cin >> h;
    if (h < 165) cnt[0]++;
    else cnt[int(h - 165) / 5 + 1]++;
  }
  for (int i = 0; i < 6; i++) {
    cout << i + 1 << ":" << string(cnt[i], '*') << endl;
  }

  return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <list>
#include <iostream>
#include <sstream>
#include <climits>
#include <cfloat>
#include <complex>


typedef long long ll;
const double Eps = 1e-6;

using namespace std;

int main()
{
	int n;
	scanf("%d", &n);
	int rank[6];
	memset(rank, 0, sizeof(rank));
	while (n--)
	{
		double tall;
		scanf("%lf", &tall);
		int i;
		for (i = 0; i < 5 && tall >= 165.0+5*i; ++i)
			;
		++rank[i];
	}
	for (int i = 0; i < 6; ++i)
	{
		printf("%d:", i+1);
		for (int j = 0; j < rank[i]; ++j)
			putchar('*');
		printf("\n");
	}

	return 0;
}

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

int main(){
  int n;
  cin >> n;
  int counter[6] = {0};
  for (int i = 0; i < n; i++) {
    double hight;
    cin >> hight;
    counter[(int)((hight - 160)/5)]++;
  }
  for (int i = 0; i < 6; i++) {
    std::cout << i + 1 << ":";
    while(counter[i] > 0){
      std::cout << '*';
      counter[i]--;
    }
    std::cout << std::endl;
  }

  return 0;
}

C++: #include <stdio.h>

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

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

scanf("%d.%d",&A,&C);
for(int i=0;i<A;i++)
{
scanf("%lf",&N);
B=N*10;
N=B+C;
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<stdio.h>
int main(void)
{
	int n;
	int cnt[7];
	int i,j;
	double sin;
	
	scanf("%d",&n);
	for(i=1;i<=6;i++){
		cnt[i]=0;
	}
	for(i=1;i<=n;i++){
		scanf("%lf",&sin);
		if(sin<165.0){
			cnt[1]++;
		}
		else if(sin<170.0){
			cnt[2]++;
		}
		else if(sin<175.0){
			cnt[3]++;
		}
		else if(sin<180.0){
			cnt[4]++;
		}
		else if(sin<185.0){
			cnt[5]++;
		}
		else if(sin>=185.0){
			cnt[6]++;
		}
	}
	for(i=1;i<=6;i++){
		printf("%d:",i);
		for(j=1;j<=cnt[i];j++){
			printf("*");			
		}
	printf("\n");
	}
	return 0;
}