J'essaye de faire un programme de calcul mental.
J'ai un probleme, je génère bien des calculs aléatoire mais je ne peux pas comparer l'expression de ma chaine où il y a le calcul avec celle de la réponse de l'utilisateur.
Voici le code:
- Code: Select all
0->C
0->X
" ->Str5
"+-*/->Str6
ClrHome
Lbl A
randInt(1,10)->A
{1,2->L1
{A,A->L2
LinReg(a+bx) L1,L2,Y1
Equ>String(Y1,Str4
DelVar Y1
ClrList L1,L2
sub(Str4,1,length(Str4)-3->Str4
Str4+Str5->Str5
If X=0
Then
sub(Str6,randInt(1,4),1)+Str5->Str5
X+1->X
Goto A
End
Output(1,1,Str5
Input Str3
End
If expr(Str5)=expr(Str3