Mathématiques

Question

A l'aide d'un algorithme, comparer 1sur a et 1sur b pour deux nombres réels de même signe a et b

1 Réponse

  • Bonjour,

    Un algorithme écrit en quel langage ? En langage commun ? Avec Algobox ?

    En langage commun :

    Initialisations :
    Afficher :"Entrer 2 nombres réels de même signe".
    Lire a
    lire b

    Traitement :
    c prend la valeur (1/a-1/b)

    Sortie :

    Si a < b ET c>0 alors
    Afficher : "Pour"
    Afficher
     a < b
    Afficher
    "on a"
     1/a < 1/b
    Sinon
    Afficher : "Pour"
    Afficher
     a < b
    Afficher
    "on a"
     1/a>1/b

Autres questions