Pagini recente » Cod sursa (job #1153192) | Cod sursa (job #411076) | Cod sursa (job #18780) | Cod sursa (job #2668541) | Cod sursa (job #1356748)
program infoarena1;
var f,g:text;
s:ansistring;
i,litere,cuvinte:longint;
function litera:boolean;
begin
litera:=((s[i] <= 'z') and (s[i] >= 'a')) or ((s[i] >= 'A') and (s[i] <= 'Z'))
end;
function cuvant:boolean;
begin
cuvant:=NOT(((s[i-1] <= 'z') and (s[i-1] >= 'a')) or ((s[i-1] >= 'A') and (s[i-1] <= 'Z')))
end;
begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
readln(f,s); litere:=0; cuvinte:=0;
for i:=2 to length(s) do
begin
if litera then
inc(litere);
if litera and cuvant then
inc(cuvinte);
end;
writeln(g,litere div cuvinte);
close(f); close(g);
end.