Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- EXERCICE 3
- VARIABLE
- courage, force, culture, diplomatie, nbProf: NUMERIQUE
- tricherie: BOOLEEN
- DEBUT
- ECRIRE("Entrez les caractéristiques du personnage (valeur entre 3 et 18), dans l'ordre : Courage, Force, Culture et Diplomatie.")
- LIRE(courage, force, culture, diplomatie)
- tricherie <- (courage+force+culture+diplomatie) > 50
- nbProf <- 0
- SI tricherie
- ALORS ECRIRE("Vous êtes un tricheur. Pas de professions.")
- SINON ECRIRE("Vos caractéristiques sont correctes. Voici la/les profession(s) accessible(s) :")
- SI courage > 12 ET force > 10
- ALORS ECRIRE("GUERRIER")
- nbProf <- nbProf+1
- SI force > 15 ET diplomatie < 6
- ALORS ECRIRE("BARBARE")
- nbProf <- nbProf+1
- FINSI
- SINONSI force < 10 ET culture > 15
- ALORS ECRIRE("MAGICIEN")
- nbProf <- nbProf+1
- FINSI
- SI diplomatie > 15
- ALORS ECRIRE("MARCHAND")
- nbProf <- nbProf+1
- SINONSI nbProf = 0
- ALORS ECRIRE("SANS PROFESSION")
- FINSI
- FINSI
- FIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement