Pagini recente » Cod sursa (job #404302) | Cod sursa (job #1102446) | Cod sursa (job #2065477) | Istoria paginii runda/5_martie_simulare_oji_2024_clasa_10 | Cod sursa (job #284612)
Cod sursa(job #284612)
var f,g:text;
ok1,ok2:boolean;
x:char;
numar_litere,numar_cuvinte:longint;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
numar_cuvinte:=0;
numar_litere:=0;
while not eof(f) do begin
ok1:=false;
ok2:=false;
while not eoln(f) do begin
read(f,x);
if x in ['a'..'z','A'..'Z'] then ok2:=true;
if not ok1 and ok2 then inc(numar_cuvinte);
if ok2 then inc(numar_litere);
end;
readln(f);
end;
writeln(g,numar_litere div numar_cuvinte);
close(f);
close(g);
end.