Pagini recente » Cod sursa (job #1289781) | Cod sursa (job #729448) | Cod sursa (job #1200643) | Cod sursa (job #2626621) | Cod sursa (job #290818)
Cod sursa(job #290818)
var x:char; c,l:longint;
f:text; ok:boolean;
begin
assign(f,'text.in');reset(f);read(f,x);
c:=0;l:=0;ok:=false;
while not eof(f) do begin
read(f,x);
case x of
'A'..'z':begin l:=l+1; ok:=true; end
else if ok=true then begin c:=c+1; ok:=false; end;
end; end;
close(f);assign(f,'text.out');rewrite(f);write(f,l,' ',c,' ',l div c);close(f);end.