efrei/alogrithmique/calculatrice.algo

20 lines
386 B
Text
Raw Normal View History

2021-09-03 09:26:47 +02:00
Algorithme : Implémente les quatre opérations (+ - * /)
Début
Variable a, b : Entier
Variable operation : Chaine
Lire(a)
Lire(operation)
Lire(b)
Si operation = "+":
Ecrire(a + b)
Sinon Si operation = "-":
Ecrire(a - b)
Sinon Si operation = "*":
Ecrire(a * b)
Sinon Si operation = "/":
Ecrire(a / b)
FinSi
Fin