basicdoc: wip

This commit is contained in:
minjaesong
2020-12-25 13:44:45 +09:00
parent 36f2c887d3
commit 796a63f579
3 changed files with 101 additions and 37 deletions

View File

@@ -1,7 +1,10 @@
1 REM Calculates a square root using newtonian method
20 INPUT X
30 Y = 0.5 * X
40 Z = Y
50 Y = Y-(((Y^2)-X)/(2*Y))
60 IF Z <> Y THEN GOTO 40
10 INPUT X
11 IF TYPEOF(X)=="num" THEN GOTO 20
12 PRINT "Please type in a number, please";
13 GOTO 10
20 Y = 0.5 * X
30 Z = Y
40 Y = Y-(((Y^2)-X)/(2*Y))
50 IF Z <> Y THEN GOTO 30
100 PRINT "Square root of ";X;" is approximately ";Y