Cod sursa(job #135970)
Utilizator | Data | 14 februarie 2008 21:51:00 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.43 kb |
const litere=['a'..'z','A'..'Z'];
var f,g:text;
x,y:char;
nrl,nrc:longint;
begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
while not eof(f) do
begin
y:=x;
read(f,x);
if x in litere then inc(nrl)
else if y in litere then inc(nrc);
end;
if x in litere then inc(nrc);
writeln(g,trunc(nrl/nrc));
close(g);
end.