AlgoBox : droites_algo7
Tester l'algorithme
Cliquer sur ce bouton pour exécuter l'algorithme :
Résultats
Graphique
Code de l'algorithme
1
VARIABLES
2
xA
EST_DU_TYPE
NOMBRE
3
yA
EST_DU_TYPE
NOMBRE
4
xB
EST_DU_TYPE
NOMBRE
5
yB
EST_DU_TYPE
NOMBRE
6
a
EST_DU_TYPE
NOMBRE
7
b
EST_DU_TYPE
NOMBRE
8
DEBUT_ALGORITHME
9
LIRE
xA
10
LIRE
yA
11
LIRE
xB
12
LIRE
yB
13
SI
(xA==xB)
ALORS
14
DEBUT_SI
15
AFFICHER
"La droite (AB) a pour équation x="
16
AFFICHER
xA
17
FIN_SI
18
SINON
19
DEBUT_SINON
20
a
PREND_LA_VALEUR
(yB-yA)/(xB-xA)
21
b
PREND_LA_VALEUR
yA-a*xA
22
AFFICHER
"La droite (AB) a pour équation y="
23
AFFICHER
a
24
AFFICHER
"x+"
25
AFFICHER
b
26
FIN_SINON
27
FIN_ALGORITHME