Pagini recente » Cod sursa (job #2655136) | Cod sursa (job #1302264) | Cod sursa (job #1524159) | Cod sursa (job #2751447) | Cod sursa (job #1039066)
Program Texte; uses crt;
var s : ansistring;
i, j, k : longint;
f, g : text;
Procedure Citeste;
begin
Assign(g,'text.in');
Reset(G);
Read(g,s);
Close(G);
End;
Procedure Scrie;
Begin
Assign(f,'text.out');
Rewrite(F);
if k=1 then j:=1;
if k=0 then
begin
j:=0; k:=1;
end;
Write(F,j div k);
Close(F);
End;
Procedure NumaraCuvinte;
Begin
S:=' '+S; k:=0; j:=0;
For i:=1 to Length(S) do
Begin
If (not (S[i] in ['a'..'z','A'..'Z','0'..'9'])) and (S[i+1] in ['a'..'z','A'..'Z']) then
k:=k+1;
If S[i] in ['a'..'z','A'..'Z'] then
j:=j+1;
End;
End;
Begin
Citeste;
NumaraCuvinte;
Scrie;
Readln;
End.