Pagini recente » Cod sursa (job #2486283) | Cod sursa (job #339711) | Cod sursa (job #541097) | Cod sursa (job #2326805) | Cod sursa (job #329871)
Cod sursa(job #329871)
Program Tex;
Var
f: Text;
c, oc: Char;
tc, nc: LongInt;
BEGIN
tc:=0; nc:=0; oc:=' ';
Assign(f,'text.in'); Reset(f);
Repeat
Read(f,c);
If c in ['A'..'Z','a'..'z'] then
Begin
Inc(tc);
If not (oc in ['A'..'Z','a'..'z']) then
Inc(nc);
End;
oc:=c;
Until Eof(f);
Close(f);
Assign(f,'text.out'); ReWrite(f);
WriteLn(f,tc div nc);
Close(f);
END.