import tools.*;

class Frec extends Program {
  void run() {
    // Creación de arreglos
    String[] tabNombres= new String[1000];
    double[] tabNotas= new double[1000];
    // Inicialización de los arreglos
    TextReader lect= new TextReader("notas.txt");
    int i= 0;
    while (true) {
      String lin= lect.readLine();
      if (lect.eofReached()) // Patrón de lectura de datos
        break;
      tabNombres[i]= trim(substring(lin, 0, 20));
      tabNotas[i]= parseDouble(trim(substring(lin, 20, 3)));
      i= i+1; // Patrón de conteo para el nro. de línea
    }
    lect.close();
    int nalum= i;

    // Construcción del arreglo
    int[] frec= new int[8];
    // Inicialización del arreglo
    i= 0;
    while (i<nalum) {
      frec[i]= 0;
      i= i+1;
    }
    // Conteo de notas por intervalo
    i= 0;
    while (i<nalum) {
      int intervalo= trunc(tabNotas[i]);
      frec[intervalo]= frec[intervalo]+1;
      i= i+1;
    }
    // Despliegue de los resultados
    int k= 1; // Para barrer los intervalos
    while (k<7) {
      println("Entre "+k+" y "+(k+0.9)+" : "+frec[k]);
      k= k+1;
    }
    println("Con nota 7.0 : "+frec[7]);
  }
}

