Pagini recente » Cod sursa (job #1083190) | Cod sursa (job #2671175) | Cod sursa (job #3258649) | Cod sursa (job #2196509) | Cod sursa (job #58189)
Cod sursa(job #58189)
program radu;
var s:string;
cuv,lung:longint;
x:char;
f,g:text;
begin
assign (f,'text.in');
reset (f);
assign (g,'text.out');
rewrite (g);
cuv:=0;
lung:=0;
while not eof(f) do
begin
read (f,x);
if ((x>='A') and (x<='Z')) or ((x>='a')and (x<='z')) then inc(lung);
end;
reset (f);
while not eof(f) do
begin
read (f,x);
if ((x>='A') and (x<='Z')) or ((x>='a')and (x<='z')) then write (g,x)
else writeln (g);
end;
reset (g);
while not eof (g) do
begin
readln (g,x);
if ((x>='A') and (x<='Z')) or ((x>='a')and (x<='z')) then inc(cuv);
end;
rewrite (g);
write (g,lung div cuv);
close (f);
close (g);
end.