Generation

translateTue, 09 May 2023

Public Sub sumar() PROGRAMA$ = "TAULA DE SUMAR" PAUSA = 4 Dim aP: Dim B(10): Dim RESO 1000 Form1.SSPanel6.Caption = "INTRODUEIX EL NÚMERO QUE MANCA" 1010 If Frecu = Fr Then Exit Sub Else Call INICIAR 1020 T = EXERCICI 1030 For numero = 0 To 9 1040 RESP = T + numero 1050 locate (numero + 9), 10: Form1.picture1.Print T; " + "; numero; " = ": locate numero + 9, 24: Form1.inputa RES$: Form1.picture1.Print RES$: RESO = Val(RES$) 1060 If RESO <> RESP Then Call ERRORI: Else GoTo 1090 1070 GoSub 1410 1080 locate (numero + 9), 22: Form1.picture1.Print " ": GoTo 1050 1090 If RESP = RESP Then Call ACERTI 1100 Next 1110 Rem If E <= C(9) Then GoTo 1120 Else GoSub 40180: E = 0: GoTo 1030 1120 Rem saltada 1121 e = 0 1130 Form1.picture1.Cls 1140 For X = 1 To 9 Form1.picture1.Cls 1150 B(X) = Int(Rnd * 10) 1160 aP = T + B(X) 1170 locate 15, 25: Form1.picture1.Print " " 1180 locate 15, 13: Form1.picture1.Print T; " + "; B(X); " = " 1190 locate 15, 27: Form1.inputa RES$: Form1.picture1.Print RES$: RO = Val(RES$) 1200 If RO <> aP Then Call ERRORI Else GoTo 1230 1210 GoSub 1410 1220 GoTo 1180 1230 If RO = aP Then Call ACERTI 1240 Next X 1250 If e <= 2 Then GoTo 1260 Else GoTo 1120 1260 Rem taula saltada: 1270 e = 0: Form1.picture1.Cls 1290 For X = 1 To 10: Form1.picture1.Cls 1300 B(X) = Int(Rnd * 10) 1310 aP = T + B(X) 1320 locate 15, 21: Form1.picture1.Print " " 1330 locate 15, 15: Form1.picture1.Print T; " + "; " "; " ="; aP; 1340 locate 15, 21:: Form1.inputa R$: Form1.picture1.Print RES$: RO = Val(RES$) 1350 If RO <> B(X) Then Call ERRORI Else GoTo 1380 1360 GoSub 1410 1370 GoTo 1330 1380 If RO = B(X) Then Call ACERTI 1390 Next X 1400 If e <= 2 Then GoTo 1000 Else GoTo 1260 1410 Rem 1420 Form1.picture1.Cls 1430 For NUM = 0 To 9: 1440 RE = T + NUM 1450 locate NUM + 8, 15: Form1.picture1.Print T; " + "; NUM; " = "; RE 1460 Next NUM 1470 PAUSA = 8: Call TIEMPO: Form1.picture1.Cls: Return End Sub

function sumar(){ let aP; let B=new Array(10); let RESO; let numero; let T; document.getElementById("SSPanel6").innerHTML = "INTRODUEIX EL NÚMERO QUE MANCA"; if(frecu == fr){ return; } else{ iniciar(); } T = exercici; for(numero = 0; numero < 10; numero++){ RESP = T + numero; document.getElementById("numero").innerHTML = T + " + " + numero + " = "; RESO = parseInt(document.getElementById("RES").value); document.getElementById("RES").innerHTML = RESO; if(RESO != RESP){ errori(); } else{ continue; } document.getElementById("numero").innerHTML = " "; }

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant