🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #8040

Re: Leer un fichero

#8040
From: Showtime
Date: Wed, 08 Jan 2003 19:13
24 lines
1385 bytes
Que os dej�is un cl�sico, Pascal (�no olvid�is el freepascal!)...


Program media;

var
    archivo:text;
    numero,total,iteraciones:integer;

begin
    total:=0;
    iteraciones:=0;
    assign (archivo,'datos.txt');
    reset (archivo);
    while not eof (archivo) do
    begin
        readln(archivo,numero);
        total:=total+numero;
        iteraciones:=iteraciones+1;
    end;
    writeln(total/iteraciones);
end.

saludos
Technical Details
Message-ID: <avhtc2$ftnri$1@ID-115330.news.dfncis.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!cable219a225.usuarios.retecal.ES!not-for-mail
References: <7d4ff0e4.0301020707.6388a1a6@posting.google.com>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,5cf283a7acb0d167
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-01-08 11:15:16 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!cable219a225.usuarios.retecal.ES!not-for-mail
From: Showtime <diegoman@usuarios.retecal.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Leer un fichero
Date: Wed, 08 Jan 2003 20:13:30 +0100
Lines: 24
Message-ID: <avhtc2$ftnri$1@ID-115330.news.dfncis.de>
References: <7d4ff0e4.0301020707.6388a1a6@posting.google.com>
Reply-To: diegoman@usuarios.retecal.es
NNTP-Posting-Host: cable219a225.usuarios.retecal.es (212.183.219.225)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: 8Bit
X-Trace: fu-berlin.de 1042053315 16703346 212.183.219.225 (16 [115330])
User-Agent: KNode/0.6.1