Programation pascal sur les tables de verite

Bonjour,
j ai un exercice a resoudre il dit :
FAIRE LE PROGRAMME EN PASCAL EN UTILISANT LES BOUCLES WHILE DE L EXPRESSION SUIVANTE :
A and B or not C
si vous pouvez m aider svp merci d avance .
Configuration: Windows XP
Internet Explorer 7.0

3 réponses

  1. tu peut trouver des cours sur le langage pascal dans ce site
    http://annaba.me/category/cours-et-series/pascal/
    1. vous pouvez etre plus precis !!!

      c'est quoi le probleme au juste ?
      1. bain mon probleme c j ai une expression
        A and B or not C
        ET ON ME DEMANDE DE FAIRE LE PROGRAMME QUI AFFICHE LA VALEUR DE CETTE EXPRESSION AVEC DES AFFECTATION SIMPLE JE L AI TROUVER ET J AI TROUVE 8 CAS ET JE L AI FAIS AUSSI AVEC LA BOUCLE FOR SA MA DONNER LE PROGRAMME SUIVANT:
        program table;
        var A,B,C:boolean ;
        begin
        writeln(' A B C A and B or not C ');
        for A:=false to true do
        for B:=false to true do
        for C:=false to true do
        writeln (A,B,C,A and B or not C );
        readln;
        end.
        maintenant mon vrai probleme c est de transformer ce programme en utilisant des boucles while.
      2. @WEMERICA tu peux toujours transformer une boucle "for" en une boucle "while" :

        ex:
        for  a:=false to true do
           begin
              // les instructions!!!
           end;
        

        apres transformation :
        a:=false;
        while a<true do
           begin
              // les instructions !!!
              a:=succ(a);
           end;
        
      3. @watoumerci beaucoup wadou votre explication ma fait avancer j ai une autre petite question comment peut on??aller du true vers le false ??
        encors milles merci .
      4. @WEMERICA au lieu de " succ " placer " pred " !!

        a:=true;
        while a> false do
           begin
              // les instructions
              a:= pred(a);
           end;