import java.io.*;
import Text;
import java.util.*;

public class H10AL1
{
  public static void main(String[] args) throws IOException
  {
    DataInputStream input; 
    Vector v= new Vector(1);
    String s1;
    Text cin= new Text();
    System.out.print("Lutfen dosya ismini giriniz: ");
    s1 = cin.readString();
    File myfile = new File(s1);
    BufferedReader b= new BufferedReader(new FileReader(myfile));     
    int toplam=0; 
    boolean EOF=false;
    while (!EOF)
    {
     try
     { 
      v.addElement(Text.readString(b));
     }
     catch (EOFException e)
     { 
       b.close(); 
       EOF=true;
     }
    } //while
    Enumeration enum=v.elements();
            while(enum.hasMoreElements())
                 {
                 Double d=new Double((String)enum.nextElement());  
                 toplam+=d.doubleValue();
                 System.out.println(""+d+" toplam: "+toplam);
                 }
    System.out.println("dosyann ve yklendigi vektorun icindeki sayilarin adedi: "+v.size());
    System.out.println("Ortalama: "+(double)toplam/v.size());    
  } //main

} //class
