Pagini recente » Cod sursa (job #2736929) | Cod sursa (job #2980112) | Cod sursa (job #2746279) | Cod sursa (job #361206) | Cod sursa (job #727095)
Cod sursa(job #727095)
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 seekEOln(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; {Pentru ca ultimul cuvant nu are spatiu dupa el}
mid:=Trunc(cl/cc);
write(f, mid);
close(f);
end.