Ancien Responsable Matière inchallahjePASS Posted March 21, 2021 Ancien Responsable Matière Share Posted March 21, 2021 https://zupimages.net/viewer.php?id=21/11/4k8s.jpeg https://zupimages.net/viewer.php?id=21/11/fdi8.jpeg bonjour, est ce que quelqu'un pourrait m'expliquer ces deux programmes svp merci d'avance Quote Link to comment Share on other sites More sharing options...
Ancien Responsable Matière Solution Timopiacés Posted March 21, 2021 Ancien Responsable Matière Solution Share Posted March 21, 2021 Salut inchallahjePASS, Alors pour la premiere ils avaient dit que à la place de "d" ils voulaient mettre "a" je crois. Donc ça fait : b=27 et c=28 donc (b==c) c'est (27==28) donc ça renvoie false c=28 et a =26 donc (c==a) c'est (28==26) et donc ça renvoie false donc si tu met bout à bout : (b==c) == (c==a) equivaut à (false)==(false) et donc ça renvoie True => le qcm est vrai Pour la seconde dans l'ordre ça fait : a=8 b=7 aux = a donc aux = 8 a = b donc a = 7 b = aux donc b = 8 a la fin du programe on a donc a = 7 et b = 8 => le qcm est faux Quote Link to comment Share on other sites More sharing options...
Ancien Responsable Matière inchallahjePASS Posted March 21, 2021 Author Ancien Responsable Matière Share Posted March 21, 2021 il y a une heure, Timopiacés a dit : Salut inchallahjePASS, Alors pour la premiere ils avaient dit que à la place de "d" ils voulaient mettre "a" je crois. Donc ça fait : b=27 et c=28 donc (b==c) c'est (27==28) donc ça renvoie false c=28 et a =26 donc (c==a) c'est (28==26) et donc ça renvoie false donc si tu met bout à bout : (b==c) == (c==a) equivaut à (false)==(false) et donc ça renvoie True => le qcm est vrai Pour la seconde dans l'ordre ça fait : a=8 b=7 aux = a donc aux = 8 a = b donc a = 7 b = aux donc b = 8 a la fin du programe on a donc a = 7 et b = 8 => le qcm est faux merci! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.