Pagini recente » Istoria paginii runda/chipciulacfr/clasament | Cod sursa (job #1819772) | Cod sursa (job #1819790) | Cod sursa (job #1542850) | Cod sursa (job #217205)
Cod sursa(job #217205)
var
v: array[1..1000] of char;
f,g: text;
ct,i,nrcuv,stot: longint;
ok: boolean;
begin
assign(f,'text.in'); assign(g,'text.out'); rewrite(g);
reset(f);
i:=1; ok:=true;
while not eof(f) do begin
read(f,v[i]);
inc(i); end; close(f);
ct:=i; stot:=0; nrcuv:=0;
for i:=2 to ct do
if ((v[i]<'z') and (v[i]>'a')) or ((v[i]<'Z') and (v[i]>'A')) then
begin inc(stot);
if ((v[i-1]<'z') and(v[i-1]>'a')) or ((v[i-1]<'Z') and (v[i-1]>'A'))
then ok:=true
else inc(nrcuv); end;
if ((v[1]<'z') and (v[1]>'a')) or ((v[1]<'Z') and (v[1]>'A')) then inc(stot);
write(g,trunc(stot/nrcuv));
end.