Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted by уфце ( 15 years ago )
program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var f:text;
nn,ch,m:char;
n,max,kol:integer;
begin
  assign(f,'C:\Documents and Settings\Admin\Рабочий стол\задания инфа\name.txt');
   reset(f);
   n:=0;
    while not eof(f) do
      begin
        readln(f,ch);
        inc(n);
      end;
   writeln('kol-vo=',n);
   close(f);
   reset(f);
   max:=0;
   while not eof(f) do
   begin
     kol:=0;
     while not eoln(f) do
     begin
       read(f,m);
       inc(kol);
     end;
     if kol>max then max:=kol;
   end;
   close(f);
   writeln('max=',max);
   readln;
  { TODO -oUser -cConsole Main : Insert code here }
end.

 

Revise this Paste

Your Name: Code Language: