uses winapi.Windows;
type
TAlphaLetter = set of 'A' .. 'Z';
var
AlphaLetter: TAlphaLetter;
YuanLetter: TAlphaLetter;
CountAlpha: ShortInt = 0;
CountYuan: ShortInt = 0;
ch: char;
begin
AlphaLetter := [];
YuanLetter := [];
read(ch);
write(ch);
while ch <> '?' do
begin
if ch in ['A' .. 'Z'] THEN
AlphaLetter := AlphaLetter + [ch];
if ch in ['A', 'E', 'I', 'O', 'U'] THEN
YuanLetter := YuanLetter + [ch]; //集合与集合相加,不是和一个ch变量代表的字符相加
read(ch);
write(ch);
end;
for ch := 'A' to 'Z' do
if ch in AlphaLetter then
begin
inc(CountAlpha);
write(ch);
end;
writeln('AlphaLetter', CountAlpha);
for ch := 'A' to 'Z' do
if ch in YuanLetter then
begin
inc(CountYuan);
write(ch);
end;
writeln('YuanLetter', CountYuan);
sleep(1000000);
end.