Pagini recente » Cod sursa (job #2869182) | Cod sursa (job #2713830) | Cod sursa (job #989047) | Cod sursa (job #388786) | Cod sursa (job #604971)
Cod sursa(job #604971)
program cuvinte;
var
ch:set of char;
s:string;
i,l,c:integer;
f,g:text;
begin
assign(f,'text.in');
assign(g,'text.out');
reset(f);
read(f,s);
close(f);
ch:=['a'..'z','A'..'Z'];
for i:=1 to length(s) do
begin
if s[i] in ch then
inc(l);
if ((s[i] in [chr(0)..chr(127)]-ch) and not (s[i+1] in [chr(0)..chr(127)]-ch)) or (i=1) then
inc(c);
end;
rewrite(g);
writeln(g,l);
writeln(g,c);
writeln(g,l div c);
close(g);
end.