Cod sursa(job #1420299)
| Utilizator | Data | 18 aprilie 2015 09:34:42 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.46 kb |
program text1;
var c1,c2:char;
n,i,j,nr:longint;
f1,f2:text;
begin
assign (f1,'text.in');
assign (f2,'text.out');
reset (f1);
rewrite (f2);
read(f1,c2); c1:='0'; nr:=0; j:=0;
while not eof(f1) do begin
if (not (c1 in ['a'..'z','A'..'Z'])) and (c2 in ['a'..'z','A'..'Z']) then nr:=nr+1;
if c1 in ['a'..'z','A'..'Z'] then j:=j+1;
c1:=c2; read(f1,c2);
end;
if c1 in ['a'..'z','A'..'Z'] then j:=j+1;
writeln (f2,j div nr);
close (f1);
close (f2);
end.
