Advertisement
pologeeko

Calcul de point au bac

Jun 15th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. Define bac()=
  2. Prgm
  3. :Local spe,a,b,c,option,option1,option2,calcul,fro,fre,hist,tpe,philo,lv1,lv2,sport,maths,phys,svt,point,note,mention
  4. :RequestStr "Votre specialite:",spe
  5. :If spe="maths" Then
  6. :a:=9
  7. :b:=6
  8. :c:=6
  9. :ElseIf spe="physique" Then
  10. :a:=7
  11. :b:=8
  12. :c:=6
  13. :ElseIf spe="svt" Then
  14. :a:=7
  15. :b:=6
  16. :c:=8
  17. :EndIf
  18. :Request "Nombre d'option(s):",option
  19. :If option=0 Then
  20. :option1:=0
  21. :option2:=0
  22. :ElseIf option=1 Then
  23. :Request "Note option:",option1
  24. :option1:=2*option1
  25. :option2:=0
  26. :ElseIf option=2 Then
  27. :Request "Note option 1:",option1
  28. :option1:=2*option1
  29. :Request "Note option 2:",option2
  30. :EndIf
  31. :Request "note francais ecrit:",fre
  32. :fre:=fre*2
  33. :Request "note francais oral:",fro
  34. :fro:=fro*2
  35. :Request "note histoire:",hist
  36. :hist:=hist*3
  37. :Request "note tpe:",tpe
  38. :If tpe>10 Then
  39. :tpe:=(10-tpe)*2
  40. :Else
  41. :tpe:=0
  42. :EndIf
  43. :Request "note philo:",philo
  44. :philo:=philo*3
  45. :Request "note sport:",sport
  46. :sport:=sport*2
  47. :Request "note lv1:",lv1
  48. :lv1:=lv1*3
  49. :Request "note lv2:",lv2
  50. :lv2:=lv2*3
  51. :Request "note maths:",maths
  52. :maths:=maths*a
  53. :Request "note svt:",svt
  54. :svt:=svt*c
  55. :Request "note physique:",phys
  56. :phys:=phys*b
  57. :point:=option1+option2+fre+fro+hist+tpe+philo+sport+lv1+lv2+maths+svt+phys
  58. :note:=((point)/(760))*20
  59. :setMode(5,2)
  60. :If 456≤point<532 Then
  61. :mention:=assez*bien
  62. :ElseIf 532≤point<608 Then
  63. :mention:=bien
  64. :ElseIf 608≤point Then
  65. :mention:=tres*bien
  66. :EndIf
  67. :Disp "Vous avez ",point," points soit une note de ",note
  68. :Disp mention
  69. :EndPrgm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement