Accueil     Soft. MacOSX     Soft. MacOS/PC     PHP     Python     ROMS GBA     TP d'info     DBZ-GT     Martingales     Galeries     Liens     @  

Exercice 6

program ex6;
var
choix, i, j, k, l, m, n, p, q, comp: integer;

begin
repeat
repeat
writeln(' http://www.Software-DS.com');
writeln;
writeln('1 : EX6-a');
writeln('2 : EX6-b');
writeln('3 : EX6-c');
writeln('4 : EX6-d');
writeln('5 : Quitter');
writeln;
readln(choix);
until (choix < 6) and (choix > 0);

if choix = 1 then
{ correction de la question a }
begin
writeln('Affichage de toutes les combianaisons de 4 bits possibles (16)');
writeln;
for i := 0 to 1 do
for j := 0 to 1 do
for k := 0 to 1 do
for l := 0 to 1 do
writeln(i : 0, j : 0, k : 0, l : 0);
end
else if choix = 2 then
{ correction de la question b }
begin
writeln('Affichage de toutes les combianaisons de 4 bits possibles (16)');
writeln;
for i := 0 to 1 do
for j := 0 to 1 do
begin
for k := 0 to 1 do
for l := 0 to 1 do
write(i : 3, j : 0, k : 0, l : 0);
writeln;
end;
end
else if choix = 3 then
{ correction de la question c }
begin
writeln('Affichage de toutes les combianaisons de 4 bits possibles (16)');
writeln;
for i := 0 to 1 do
for j := 0 to 1 do
for k := 0 to 1 do
for l := 0 to 1 do
for m := 0 to 1 do
for n := 0 to 1 do
for p := 0 to 1 do
for q := 0 to 1 do
begin
writeln(i : 0, j : 0, k : 0, l : 0, m : 0, n : 0, p : 0, q : 0);
comp := comp + 1;
if (comp mod 20) = 0 then
readln;
end;
end
else if choix = 4 then
{ correction de la question d }
begin
comp := 0;
writeln('Affichage de toutes les combianaisons de 4 bits possibles (16)');
writeln;
for i := 0 to 1 do
for j := 0 to 1 do
for k := 0 to 1 do
for l := 0 to 1 do
begin
for m := 0 to 1 do
for n := 0 to 1 do
for p := 0 to 1 do
for q := 0 to 1 do
begin
writeln(i : 0, j : 0, k : 0, l : 0);
writeln(m : 0, n : 0, p : 0, q : 0);
comp := comp + 1;
if (comp mod 10) = 0 then
readln;
end;
end;
end;
writeln;
writeln;
until choix = 5;
writeln('Merci d''avoir telecharger mon programme.');
{ ©2001 All Rights Reserved to http://www.Software-DS.com 02/10/01 }
end.





Haut de la page - Page précédente - Page générée en 0.00273 sec.
Recherche personnalisée
 

1844216 visiteurs.   ©2001-2023 All Rights Reserved to Software-DS.com
Made with a mac  
Confidentialité