Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ALGO
- Exercice 3
- (1)
- Début
- Nbe1 : entier;
- Nbe2 : entier;
- Plus_petit_nb : entier;
- Plus_grand_nb : entier;
- Saisir Nbe1;
- Saisir Nbe2;
- Si Nbe1 == Nbe2
- Alors
- Afficher "Nbe1 et Nbe2 sont égaux";
- Sinon
- Si Nbe1 < Nbe2
- Alors
- Plus_petit_nb <- Nbe1;
- Plus_grand_nb <- Nbe2;
- Sinon
- Plus_petit_nb <- Nbe2;
- Plus_grand_nb <- Nbe1;
- Fin Si
- Fin Si
- Afficher "Le plus petit nombre est ";
- Afficher Plus_petit_nb;
- Afficher "Le plus petit nombre est ";
- Afficher Plus_grand_nb;
- Fin
- __________________
- (2)
- Début
- Nbe1 : entier;
- Nbe2 : entier;
- Nbe3 : entier;
- Plus_petit_nb : entier;
- Plus_grand_nb : entier;
- Saisir Nbe1;
- Saisir Nbe2;
- Saisir Nbe3;
- Si Nbe1 < (Nbe2 et Nbe3)
- Alors
- Si Nbe2 < Nbe3
- Alors
- Plus_petit_nb <- Nbe1;
- Plus_grand_nb <- Nbe3;
- Sinon
- Plus_petit_nb <- Nbe1;
- Plus_grand_nb <- Nbe2;
- Fin Si
- Sinon Si Nbe2 < (Nbe1 et Nbe3)
- Alors
- Si Nbe1 < Nbe3
- Alors
- Plus_petit_nb <- Nbe2;
- Plus_grand_nb <- Nbe3;
- Sinon
- Plus_petit_nb <- Nbe2;
- Plus_grand_nb <- Nbe1;
- Fin Si
- Sinon Si Nbe3 < (Nbe1 et Nbe2)
- Alors
- Si Nbe1 < Nbe2
- Alors
- Plus_petit_nb <- Nbe3;
- Plus_grand_nb <- Nbe2;
- Sinon
- Plus_petit_nb <- Nbe3;
- Plus_grand_nb <- Nbe1;
- Fin Si
- Fin Si
- Afficher "Le plus petit nombre est ";
- Afficher Plus_petit_nb;
- Afficher "Le plus petit nombre est ";
- Afficher Plus_grand_nb;
- Fin
- __________________
- (3)
- Début
- Nbe1 : entier;
- Nbe2 : entier;
- Nbe3 : entier;
- Plus_petit_nb : entier;
- Plus_grand_nb : entier;
- Saisir Nbe1;
- Saisir Nbe2;
- Saisir Nbe3;
- Si Nbe1 == Nbe2
- Si Nbe1 == Nbe3
- Alors
- Afficher "Tout les nombres sont égaux !";
- Sinon
- Afficher "Nbe1 et Nbe2 sont égaux !";
- Fin Si
- Sinon Si Nbe1 == Nbe3
- Si Nbe1 == Nbe2
- Alors
- Afficher "Tout les nombres sont égaux !";
- Sinon
- Afficher "Nbe1 et Nbe3 sont égaux !";
- Fin Si
- Sinon Si Nbe2 == Nbe3
- Si Nbe2 == Nbe3
- Alors
- Afficher "Tout les nombres sont égaux !";
- Sinon
- Afficher "Nbe2 et Nbe3 sont égaux !";
- Fin Si
- Fin Si
- Si Nbe1 < (Nbe2 et Nbe3)
- Alors
- Si Nbe2 < Nbe3
- Alors
- Plus_petit_nb <- Nbe1;
- Plus_grand_nb <- Nbe3;
- Sinon
- Plus_petit_nb <- Nbe1;
- Plus_grand_nb <- Nbe2;
- Fin Si
- Sinon Si Nbe2 < (Nbe1 et Nbe3)
- Alors
- Si Nbe1 < Nbe3
- Alors
- Plus_petit_nb <- Nbe2;
- Plus_grand_nb <- Nbe3;
- Sinon
- Plus_petit_nb <- Nbe2;
- Plus_grand_nb <- Nbe1;
- Fin Si
- Sinon Si Nbe3 < (Nbe1 et Nbe2)
- Alors
- Si Nbe1 < Nbe2
- Alors
- Plus_petit_nb <- Nbe3;
- Plus_grand_nb <- Nbe2;
- Sinon
- Plus_petit_nb <- Nbe3;
- Plus_grand_nb <- Nbe1;
- Fin Si
- Fin Si
- Afficher "Le plus petit nombre est ";
- Afficher Plus_petit_nb;
- Afficher "Le plus petit nombre est ";
- Afficher Plus_grand_nb;
- Fin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement