« Algorithmique/Exercices et solutions » : différence entre les versions
Contenu supprimé Contenu ajouté
→Ex 6.8 : un peu de mise en forme |
|||
Ligne 136 :
algorithme tarifReduit (droit :booléen)->réel
'''fin si'''▼
'''retourner ok'''▼
'''fin algorithme'''▼
'''autre version:''' par (hamza de A322)▼
'''algorithme tarifReduit (tarif:entier)-->boolean'''▼
ok'''-->''' boolean▼
ok<--a une tarif réduit▼
'''si''' ok '''<--''' age'''<'''18ans '''alors'''▼
ok'''='''vrai▼
'''sinon'''▼
ok '''<--''' age'''>'''18ans '''alors'''▼
ok=faux▼
'''fin si'''
'''retourner ok'''
'''fin algorithme'''
▲'''autre version:''' par (hamza de A322)
▲'''algorithme tarifReduit (tarif:entier)-->boolean'''
▲ok'''-->''' boolean
▲ok<--a une tarif réduit
▲'''si''' ok '''<--''' age'''<'''18ans '''alors'''
▲ok'''='''vrai
▲'''sinon'''
▲ok '''<--''' age'''>'''18ans '''alors'''
▲ok=faux
▲'''fin si'''
▲'''retourner ok'''
▲'''fin algorithme'''
== Ex 6.9==
|