Pagini recente » Borderou de evaluare (job #526619) | Borderou de evaluare (job #376533) | Borderou de evaluare (job #726839) | Cod sursa (job #726846)
Cod sursa(job #726846)
var f:text;
cl,cc:longint;
mid:longint;
c:char;
const ALPHA = ['A'..'Z', 'a'..'z'];
begin
cl:=0;
cc:=0;
assign(f, 'text.in');
reset(f);
while EOF(f) = false do begin
read(f, c);
if c in ALPHA then
cl:=cl+1
else if c = ' ' then
cc:=cc+1;
end;
close(f);
assign(f, 'text.out');
rewrite(f);
cc:=cc+1;
mid:=Trunc(cl/cc);
write(f, mid);
close(f);
end.