Cod sursa(job #317841)
| Utilizator | Data | 25 mai 2009 13:57:05 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.62 kb |
var l,szo:longint;
f,g:text;
procedure olvas;
var c,cc:char;
begin
assign(f,'text.in');
reset(f);
cc:='-';
while not eof(f) do begin
read(f,c);
case c of
'a'..'z':inc(l);
'A'..'Z':inc(l);
else if cc in ['a'..'z','A'..'Z'] then inc(szo);
end;
cc:=c;
end;
if cc in ['a'..'z','A'..'Z'] then inc(szo);
close(f);
end;
procedure kiir;
begin
Assign(g,'text.out');
Rewrite(g);
Writeln(g,l div szo);
Close(g);
end;
Begin
Olvas;
Kiir;
End.
