Pagini recente » Monitorul de evaluare | Cod sursa (job #370944) | Profil KarinA | Cod sursa (job #2783991) | Cod sursa (job #274676)
Cod sursa(job #274676)
var f,g:text;
a:char;
cuv,sp:longint;
procedure load;
begin
assign(f,'text.in');
reset(f);cuv:=0;sp:=0;
while not eof(f) do
begin
while not eoln(f) do
begin
read(f,a);
if a <> ' ' then
cuv:=cuv+1;
if a = ' ' then
sp:=sp+1;
end;
end;
close(f);
end;
procedure write;
begin
assign(g,'text.out');
rewrite(g);
writeln(g,cuv div sp);
close(g);
end;
BEGIN
load;
write;
END.