Advertisement
Guest User

Untitled

a guest
Aug 8th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XBasic 1.20 KB | None | 0 0
  1.  
  2. goto dessin
  3. end
  4.  
  5. dessin:
  6. clearw
  7. jaune=COLOR_RGB(0,1,1)
  8. vert=COLOR_RGB(0,1,0)
  9. COLOR jaune,vert
  10. deffill 0,1,0
  11. line 20,20,100,300
  12. pcircle 100,100,50
  13. pbox 100,200,300,300
  14. for i%=1 to 20
  15.    circle 240,240+i%*3+5, 3*i%
  16. next i
  17. repeat
  18. until len(inkey$)
  19. end
  20.  
  21. agecalcul:
  22. input "Donne-moi ton âge en années: ", nombre1
  23. print "Ca fait:"
  24. print nombre1*12; " mois"
  25. print nombre1*12*52; " semaines"
  26. print nombre1*12*365.25; " jours"
  27. print nombre1*12*365.25*24; " heures"
  28. print nombre1*12*365.25*24*60; " minutes"
  29. print nombre1*12*365.25*24*60*60; " secondes"
  30. end
  31.  
  32. addition:
  33. input "Donne-moi un nombre: ", nombre1
  34. input "Donne-moi un autre nombre: ", nombre2
  35. print nombre1 ; " plus "; nombre2; " = "; nombre1+nombre2
  36. end
  37.  
  38. multiple:
  39. input "Donne-moi un nombre: ", nombre1
  40. input "Donne-moi un autre nombre: ", nombre2
  41. print nombre1; " multiplié par "; nombre2; " = "; nombre1*nombre2
  42. end
  43.  
  44. nomage:
  45. cls
  46. nom$=""
  47. age=0
  48. dureeage$=" ans"
  49. input "Qui es-tu? ", nom$
  50. nomminuscule$=lower$(nom$)
  51. if nomminuscule$ ="jules" or nomminuscule$ ="noé" or nomminuscule$ = "tom"
  52.   dureeage$=" mois"
  53. endif
  54. input "Quel âge as-tu? ", age
  55. print "tu t'appelles "; nom$; " et tu as "; str$(age); dureeage$
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement