Cod sursa(job #279893)
| Utilizator | Data | 13 martie 2009 08:33:57 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.46 kb |
//const litere=['a'..'z','A'..'Z'];
var s:ansistring;
i,nrc,nrcuv:longint;
begin
assign(input,'text.in');reset(input);
assign(output,'text.out');rewrite(output);
while not eof do begin
readln(s);s:=s+' ';
for i:=1 to length(s)-1 do begin
if (s[i] in ['a'..'z','A'..'Z'])and not(s[i+1] in['a'..'z','A'..'Z']) then
inc(nrcuv);
if s[i] in['a'..'z','A'..'Z'] then inc(nrc);
end;
end;
write(nrc,' ',nrcuv);
close(input);close(output);
end.