home *** CD-ROM | disk | FTP | other *** search
/ Video Commodore 64 #2 / Video_Commodore_64_2_19xx_GEASA.d64 / sumar (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  3KB  |  87 lines

  1. 5 rem sumar y restar  - vc64-02
  2. 10 gosub3000
  3. 100 gosub1000
  4. 300 print"[160]"
  5. 410 end
  6. 1000 rem juego
  7. 1010 at$=chr$(17):fort=1to6:at$=at$+at$:nextt:at$=chr$(19)+at$
  8. 1020 gosub10000
  9. 1030 poke53280,7:poke53281,3:printchr$(147)
  10. 1040 sm=0:sc=0
  11. 1140 pokeso+4,17:fort=1to40:nextt:pokeso+4,16
  12. 1150 print"(s)uma o (r)esta";
  13. 1155 inputc$
  14. 1160 ifleft$(c$,1)="s"thens$="+":goto1190
  15. 1170 ifleft$(c$,1)="r"thens$="-":goto1190
  16. 1180 print"[147]":goto1150
  17. 1190 print"(u)nidades o (d)ecenas:";
  18. 1195 inputm$
  19. 1200 ifleft$(m$,1)="u"thenm=10:goto1205
  20. 1202 ifleft$(m$,1)="d"thenm=100:goto1205
  21. 1203 print"":goto1190
  22. 1205 ifs$="-"then1260
  23. 1210 r1=int(rnd(0)*m)+1
  24. 1215 r2=int(rnd(0)*m)+1
  25. 1220 pokeso+4,17:fort=1to40:nextt:pokeso+4,16
  26. 1230 ca=r1+r2
  27. 1240 printleft$(at$,sm+4)spc(6)r1" ";s$;"[160]"r2;" = ";
  28. 1250 goto1310
  29. 1260 r1=int(rnd(0)*m)+1
  30. 1270 r2=int(rnd(0)*m)+1
  31. 1280 ca=r1-r2
  32. 1290 printleft$(at$,sm+4)spc(6)r1;" ";s$;"[160]";r2;" = ";
  33. 1300 pokeso+4,17:fort=1to40:nextt:pokeso+4,16
  34. 1310 inputans
  35. 1330 sm=sm+1
  36. 1340 ifans=cathen1380
  37. 1350 pokeso+4,17:fort=1to40:nextt:pokeso+4,16
  38. 1360 printleft$(at$,sm+3)spc(25)"fallaste.es ";ca;
  39. 1370 goto1410
  40. 1380 pokeso+1,30:pokeso+4,17:fort=1to100:nextt:pokeso+4,16:pokeso+1,20
  41. 1390 printleft$(at$,sm+3)spc(25)"acertaste !!!";
  42. 1400 sc=sc+1
  43. 1410 rem 1410
  44. 1420 ifsm=20then1460
  45. 1430 printleft$(at$,1)spc(5)"sumas: ";sm;
  46. 1440 printleft$(at$,1)spc(17)"puntuacion: ";sc;
  47. 1450 goto1205
  48. 1460 fordl=1to250:nextdl
  49. 1480 print:print"tienes "sc" respuestas correctas"
  50. 1490 print:print"de un total de 20 preguntas."
  51. 1900 print"quieres intentarlo de nuevo?"
  52. 1910 geta$:ifa$=""then1910
  53. 1920 ifa$="s"then1030
  54. 1930 ifa$="n"then1999
  55. 1940 goto1910
  56. 1999 return
  57. 3000 poke53281,14:poke53280,15:print"[147]";
  58. 3010 print"[207][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][208]";
  59. 3020 print"[180]            sumar y restar            [170]";
  60. 3030 print"[204][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][186]";
  61. 3040 print"[207][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][208]";
  62. 3050 print"[180]                                      [170]";
  63. 3060 print"[180]                                      [170]";
  64. 3070 print"[180]       un sencillo juego educativo    [170]";
  65. 3080 print"[180]    para los mas pequenos:            [170]";
  66. 3090 print"[180]                                      [170]";
  67. 3100 print"[180]       'competir' con commodore-64    [170]";
  68. 3110 print"[180]    en la realizacion de 20 sumas 0   [170]";
  69. 3120 print"[180]    restas (a elegir).                [170]";
  70. 3130 print"[180]                                      [170]";
  71. 3140 print"[180]        puedes elegir suma o resta    [170]";
  72. 3150 print"[180]    y decenas o unidades.             [170]";
  73. 3160 print"[180]                                      [170]";
  74. 3170 print"[180]                                      [170]";
  75. 3180 print"[180]                                      [170]";
  76. 3190 print"[180]                                      [170]";
  77. 3200 print"[180]                                      [170]";
  78. 3210 print"[180]                                      [170]";
  79. 3220 print"[204][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][186]";
  80. 3230 print"[207][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][208]";
  81. 3240 print"[180]      pulsa 'space' para continuar    [170]";
  82. 3250 print"[204][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][186]";
  83. 3950 geta$:ifa$<>" "then3950
  84. 3999 return
  85. 10000 so=54272:fort=0to28:pokeso+t,0:next
  86. 10010 pokeso+1,20:pokeso+5,9:pokeso+6,240:pokeso+24,15:pokeso+4,16:return
  87.