Forum

Catégorie : Programmes
Forum : Les programmes des internautes
Vues : 3436
Réponses : 6
Type : discussion
Etat : réponses autorisées

Memoire

Sangohan38 le 10/07/2006 à 18:40
Voila un petit, programme ou il faut retenir les chiffres et les retapés après:

Code
0ü ( ) A
Lbl 0
ClrHome
A+1ü ( ) A
Output(1,5,"MEMOIRE:"
int(rand10ü ( ) B
int(rand10ü ( ) C
int(rand10ü ( ) D
int(rand10ü ( ) E
int(rand10ü ( ) F
int(rand10ü ( ) G
int(rand10ü ( ) H
int(rand10ü ( ) I
int(rand10ü ( ) J
int(rand10ü ( ) K
int(rand10ü ( ) L
int(rand10ü ( ) M
int(rand10ü ( ) N
int(rand10ü ( ) O
int(rand10ü ( ) P
int(rand10ü ( ) Q
Output(3,1,B
Output(3,2,C
Output(3,3,D
Output(3,4,E
Output(3,5,F
Output(3,6,G
Output(3,7,H
Output(3,8,I
Output(3,9,J
Output(3,10,K
Output(3,11,L
Output(3,12,M
Output(3,13,N
Output(3,14,O
Output(3,15,P
Output(3,16,Q
If A=1:Output(3,2,"               "
If A=2:Output(3,3,"              "
If A=3:Output(3,4,"             "
If A=4:Output(3,5,"            "
If A=5:Output(3,6,"           ":If A=6:Output(3,7,"          "
If A=7:Output(3,8,"         "
If A=8:Output(3,9,"        "
If A=9:Output(3,10,"       "
If A=10:Output(3,11,"      "
If A=11:Output(3,12,"     "
If A=12:Output(3,13,"    "
If A=13:Output(3,14,"   "
If A=14:Output(3,15,"  "
If A=15:Output(3,16," "
0ü ( ) Á
20*Aü ( ) V
Lbl 1
1ü ( ) X
Output(8,1,"          "
Output(7,2,"TEMPS RESTANT:"
Output(8,1,V-Á
Á+1ü ( ) Á
If Á<V:Goto 1
Lbl 2
ClrHome
ú ( ) 1ü ( ) Y
getKeyü ( ) Z
If Z=102:0ü ( ) Y
If Z=92:1ü ( ) Y
If Z=93:2ü ( ) Y
If Z=94:3ü ( ) Y
If Z=82:4ü ( ) Y
If Z=83:5ü ( ) Y
If Z=84:6ü ( ) Y
If Z=72:7ü ( ) Y
If Z=73:8ü ( ) Y
If Z=74:9ü ( ) Y
If Yù ( ) 0:Goto 3
Goto 2
Lbl 3
If A=1 and X=1 and Y=B or A=2 and X=2 and Y=C or A=3 and X=3 and Y=D or A=4 and X=4 and Y=E or A=5 and X=5 and Y=F or A=6 and X=6 and Y=G or A=7 and X=7 and Y=H or A=8 and X=8 and Y=I or X=9 and A=9 and Y=J or A=10 and X=10 and Y=K or A=11 and X=11 and Y=L or A=12 and X=12 and Y=M or A=13 and X=13 and Y=N or A=14 and X=14 and Y=O or A=15 and X=15 and Y=P:Goto 5
If X=16 and A=16 and Y=Q:Goto Á
If X=1 and YøB or X=2 and YøC or X=3 and YøD or X=4 and YøE or X=5 and YøF or X=6 and YøG or X=7 and YøH or X=8 and YøI or X=9 and YøJ or X=10 and YøK or X=11 and YøL or X=12 and YøM or X=13 and YøN or X=14 and YøO or X=15 and YøP or X=16 and YøQ:Goto 9
If X<A and Y=B or X<A and Y=C or A>X and Y=D or A>X and Y=E or A>X and Y=F or A>X and Y=G or A>X and Y=H or A>X and Y=I or A>X and Y=J or A>X and Y=K or A>X and Y=L or A>X and Y=M or A>X and Y=N or A>X and Y=O or A>X and Y=P
For(W,1,10
Output(4,1,"CHIFFRE CORRECT!"
End
X+1ü ( ) X
Goto 2
Lbl Á
For(W,1,20
Output(4,5,"BRAVO!"
Output(5,1,"TU AS UNE TRES  BONNE MEMOIRE."
End
ClrHome
Stop
Lbl 9
For(W,1,50
Output(5,14,A-1
Output(2,1,"DESOLER MAIS LA BONNE REPONSE   ETAIT  .        TU AS RETENU    CHIFFRES EN MEMETEMPS."
If X=1:Output(4,7,B
If X=2:Output(4,7,C
If X=3:Output(4,7,D
If X=4:Output(4,7,E
If X=5:Output(4,7,F
If X=6:Output(4,7,G
If X=7:Output(4,7,H
If X=8:Output(4,7,I
If X=9:Output(4,7,J
If X=10:Output(4,7,K
If X=11:Output(4,7,L
If X=12:Output(4,7,M
If X=13:Output(4,7,N
If X=14:Output(4,7,O
If X=15:Output(4,7,P
If X=16:Output(4,7,Q
End
ClrHome
Stop
Lbl 5
For(W,1,10
Output(3,1,"LA FORCE VIEN ENTOI JEUNE       APPRENTIS."
End
Goto 0

Pour le lien vous aller la ou je met mes programmes.
Sangohan38 le 11/07/2006 à 09:56
Je savais que t'en avais fait un mais voila ça c'est ma version.
Sangohan38 le 19/11/2006 à 12:14
Voici une nouvelle version de mon prog:

Code
:0->A
:Lbl 0
:0->T
:A+1->A
:ClrList L1
:ClrHome
:Output(1,4,"MEMOIRE:"
:16->dim L1
:For(B,1,A
:int rand10->L1(B)
:Output(4,B,L1(B)
:End
:Output(7,2,"TEMPS RESTANT:"
:A*50->T
:getKey->K
:While T[DIFFERENT DE]0:getKey->K
:If K=21:1->T
:T-1->T
:Output(8,6,T
:End
:0->G
:Lbl 1
:0->D
:0->K
:ClrHome
:getKey->K
:If K=72:7->D
:If K=73:8->D
:If K=74:9->D
:If K=82:4->D
:If K=83:5->D
:If K=84:6->D
:If K=92:1->D
:If K=93:2->D
:If K=94:3->D
:If K=102:0->D
:If K>71 and K<103:Goto 2
:Goto 1
:Lbl 2
:G+1->G
:If L1(G)=D and A[DIFFERENT DE]G:Then:For(F,1,30:Output(4,6,"JUSTE!":End:Goto 1:End
:If L1(G)[DIFFERENT DE]D:Then:Output(2,7,"FAUX      LA BONNE REPONSEETAIT   .":Output(4,7,L1(G):End
:If L1(G)=D and A=16:Then:ClrHome:Output(3,1,"BRAVO TU AS UNE TRES BONNE      MEMOIRE!":End
:If L1(G)=D and G=A:Goto 0


Et le lien:http://www.new-uploader.com/fi[...]EMOIRE.82p.html

Sangohan38
Stupid le 19/11/2006 à 14:28
j'aime bien le "petit programme" du début...
Sangohan38 le 19/11/2006 à 15:01
Il est relativement court par rapport à d'autre qui prenaient 12ko.

Sangohan38
Stupid le 28/11/2006 à 14:43
t'aurais pas pu mettre un entier aleatoire de 10^16 ou il y'a des points en fonction du nombre de chiffres justes?
Sangohan38 le 29/11/2006 à 13:19
Ce serais plus lords de générer autant de nombre et après, l'utilisateur ne pourra pas retenir un maximum alor qsu'avec 16 chiffres, c'est plus simple et pour y arriver, c'est déja dur.

Sangohan38

PS: Une mémoire peut entrainée peut retenir jusqu'à 8 chiffres.