Pagini recente » Monitorul de evaluare | Monitorul de evaluare | Profil Nuta Alexandru (ASN49K) | Istoria paginii monthly-2014/runda-2 | Cod sursa (job #608506)
Cod sursa(job #608506)
program textulet;
var f:text;c:char;cuv,lit:longint;
begin
assign(f,'text.in');
reset(f);
cuv := 0; lit := 0;
while not eof(f) do
begin
read(f,c);
if upcase(c) in ['A'..'Z'] then
begin
cuv := cuv + 1;
while (upcase(c) in ['A'..'Z']) and (not eof(f)) do
begin
lit := lit + 1;
read(f,c);
end;
end;
end;
close(f);
assign(f,'text.out');
rewrite(f);
write(f,lit div cuv);
close(f);
end.