1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| program voyelles;
{ by ptitJoz }
uses crt;
const ListeVoyelles='aàâäeèéêëiîïoôöuùûüyÿ';
var chaine:string;
var i,j,flag:Integer;
begin
clrscr;
Writeln('le programme affichera les voyelles en jaune');
repeat
write('Entrez quelques mots ou * pour fin : ');
readln(chaine);
writeln;
for i:=1 to length(chaine) do
begin
flag:=0;
for j:=1 to length(ListeVoyelles) do
if upcase(chaine[i])=upcase(ListeVoyelles[j]) then flag:=1;
if flag=1 then textcolor(14) else textcolor(7);
write(chaine[i]);
end;
textcolor(7);
writeln;
until chaine = '*';
end. |
Partager