-->
end.
-->
Soit T un tableau contenant n lettres alphabétiques.
On se propose de ranger les voyelles dans un tableau V et
les consonnes dans un tableau C.
program eclate;
uses wincrt;
var t,v,c: array[1..20]of char;
n,nv,nc,i:integer;
begin
repeat
write('n=?');
readln(n);
until (n>=5) and (n<=20);
for i:=1 to n do
repeat
write('donner t[',i,']');
readln(t[i]);
until (upcase(t[i])) in ['A'..'Z'];
nv:=0;
nc:=0;
for i:=1 to n do
if (upcase(t[i])) in ['A','E','Y','U','I','O'] then
begin
nv:=nv+1;
v[nv]:=t[i];
end
else
begin
nc:=nc+1;
c[nc]:=t[i];
end;
write('les voyelles sont: ');
for i:=1 to nv do
write(v[i], ' ');
writeln;
write('les consonnes sont: ');
for i:=1 to nc do
write(c[i], ' ');