Cod sursa(job #398385)
| Utilizator | Data | 18 februarie 2010 16:52:10 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.88 kb |
var i,j,k,lcuv,cuv,nrcuv:integer;
x:char;
f:text;
procedure mac1;
begin
assign(f,'text.in');
reset(f);
while not eof(f) do
begin
read(f,x);
if ( (((ord(x)>95)and(ord(x)<123)) ) or (((ord(x)>64)and(ord(x)<91))))then
begin
inc(lcuv);
inc(cuv);
end
else
if cuv>0 then begin inc(nrcuv);
cuv:=0;
end;
end;
if cuv>0 then begin inc(nrcuv);
cuv:=0;
end;
close(f);
assign(f,'text.out');
rewrite(f);
write(f,lcuv div nrcuv);
close(f);
end;
begin
mac1;
end.
