
je sais ça ne sert à rien, donc il était indispensable que je le fasse

Code original:
Code : Tout sélectionner
1 P = 3.1415926
4 C = 62
5 R = 18
6 T = 0.055
10 FOR Y=1 TO -1 STEP -2/R
20 FOR X=0 TO 2*P STEP 2*P/C
30 IF ABS(SIN(X)-Y) < T THEN GOTO 35
31 PRINT " ";:GOTO 40
35 PRINT "*";
40 NEXT X
45 PRINT ""
50 NEXT Y
Code : Tout sélectionner
#Q = #DQUOTE$
#DELAY = 45
OpenConsole()
:EnableGraphicalConsole(1)
:ConsoleColor(15, 0)
:ConsoleCursor(10)
PosX = 0
PosY = 0
PrintN("LIST"):PrintN("")
Delay(#DELAY*15)
Restore Listing
For i = 1 To 12
Read.s tmp$
PrintN(tmp$)
Delay(#DELAY*2)
Next i
PrintN("")
Delay(#DELAY*5)
PrintN("RUN")
Delay(#DELAY*10)
PrintN("")
p.f = #PI
c.i = 62
r.i = 18
t.f = 0.055
y.f = 1
PosY = 17
While y >= -1
x.f = 0
While x <= 2*p
ConsoleColor(15,15)
ConsoleLocate(PosX+1,PosY):Print(" ")
If Abs(Sin(x)-y) < t
ConsoleColor(15,0)
ConsoleLocate(PosX,PosY):Print("*")
Else
ConsoleColor(15,0)
ConsoleLocate(PosX,PosY):Print(" ")
EndIf
posX+1
x + 2*p/c
Delay(#DELAY)
Wend
ConsoleLocate(PosX,PosY):ConsoleColor(0,0):Print(" ")
PrintN(""):Posy+1:PosX=0
y - 2/r
Wend
Input()
CloseConsole()
End
DataSection
Listing:
Data.s "1 P = 3.1415926"
Data.s "4 C = 62"
Data.s "5 R = 18"
Data.s "6 T = 0.055"
Data.s "10 FOR Y=1 TO -1 STEP -2/R"
Data.s "20 FOR X=0 TO 2*P STEP 2*P/C"
Data.s "30 IF ABS(SIN(X)-Y) < T THEN GOTO 35"
Data.s "31 PRINT "+#Q+" "+#Q+";:GOTO 40"
Data.s "35 PRINT "+#Q+"*"+#Q+";"
Data.s "40 NEXT X"
Data.s "45 PRINT "+#Q+#Q
Data.s "50 NEXT Y"
EndDataSection