Pagini recente » Cod sursa (job #2334964) | Cod sursa (job #2034793) | Cod sursa (job #1130883) | Cod sursa (job #3156744) | Cod sursa (job #969834)
Cod sursa(job #969834)
program a1;
var s:string;
litere,cuv,i:integer;
a,b:text;
begin
assign(a,'texr.in');
assign(b,'text.out');
reset(a);
rewrite(b);
readln(a,s);
litere:=0;
cuv:=0;
for i:=1 to length(s) do
begin
if (s[i] in ['a'..'z']) or (s[i] in ['A'..'Z']) then inc(litere);
if i = 1 then
begin
if (s[i] in ['a'..'z']) or (s[i] in ['A'..'Z']) then
begin
inc(cuv);
end
else
begin
if ((s[i] in ['a'..'z']) or (s[i] in ['A'..'Z'])) and (not (s[i-1] in ['a'..'z'])) and (not
(s[i-1] in ['A'..'Z']))
then inc(cuv);
end;
end;
end;
write(b,litere div cuv);
close(a);
close(b);
end.