Pagini recente » Cod sursa (job #1915839) | Cod sursa (job #2724130) | Cod sursa (job #2815081) | Cod sursa (job #1618908) | Cod sursa (job #1650936)
var
s: string;
i, j, x, y, z: longint;
function eLitera(c: char): boolean;
begin
eLitera := (c in ['a'..'z']) or (c in ['A'..'Z']);
end;
begin
assign(input, 'text.in');
assign(output, 'text.out');
reset(input);
rewrite(output);
x := 0;
y := 0;
read(s);
for i := 1 to length(s) do
begin
if eLitera(s[i]) then x := x + 1;
if i < length(s) then
if not eLitera(s[i]) and eLitera(s[i+1]) then
y := y + 1;
end;
if eLitera(s[1]) then y := y + 1;
write(x, ' ', y);
end.