Dans mon exercice on me dit :
Ecrire un algorithme prenant en entrée les coordonnées de trois points et affichant en sortie si ces trois points sont alignés. On pourra noter (x1;y1) , (x2;y2) et (x3;y3) ces coordonnées.
On m'a montré un algorithme :
Debut
Entrer x1 x2 x3 y1 y2 y3
Lire x1 x2 x3 y1 y2 y3
Si x1=x2 et x1=x3
Alors afiicher " LES POINTS SONT ALIGNEES "
Sinon si x1 different x2 , x1 different de x3
Alors si (y2-y1)/(x2-x1) = (y3-y1)/(x3-x1)
Alors afficher " LES POINTS SONT ALIGNEES "
Sinon afficher " LES POINTS NE SONT PAS ALIGNEES "
Fin si
Fin si
Fin si
Fin
Je ne comprends pas pourquoi on fait ce calcule , pouvez vous m'expliquer svp ? Ou me proposer un autre algorithme en m'expliquant svp ?
Vous devez être membre accéder à ce service...
Pas encore inscrit ?
1 compte par personne, multi-compte interdit !
Ou identifiez-vous :