Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. EXERCICE 3
  2.  
  3. VARIABLE
  4. courage, force, culture, diplomatie, nbProf: NUMERIQUE
  5. tricherie: BOOLEEN
  6.  
  7. DEBUT
  8. ECRIRE("Entrez les caractéristiques du personnage (valeur entre 3 et 18), dans l'ordre : Courage, Force, Culture et Diplomatie.")
  9. LIRE(courage, force, culture, diplomatie)
  10. tricherie <- (courage+force+culture+diplomatie) > 50
  11. nbProf <- 0
  12. SI tricherie
  13. ALORS ECRIRE("Vous êtes un tricheur. Pas de professions.")
  14. SINON ECRIRE("Vos caractéristiques sont correctes. Voici la/les profession(s) accessible(s) :")
  15. SI courage > 12 ET force > 10
  16. ALORS ECRIRE("GUERRIER")
  17. nbProf <- nbProf+1
  18. SI force > 15 ET diplomatie < 6
  19. ALORS ECRIRE("BARBARE")
  20. nbProf <- nbProf+1
  21. FINSI
  22. SINONSI force < 10 ET culture > 15
  23. ALORS ECRIRE("MAGICIEN")
  24. nbProf <- nbProf+1
  25. FINSI
  26. SI diplomatie > 15
  27. ALORS ECRIRE("MARCHAND")
  28. nbProf <- nbProf+1
  29. SINONSI nbProf = 0
  30. ALORS ECRIRE("SANS PROFESSION")
  31. FINSI
  32. FINSI
  33. FIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement