Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
17
Task/Babbage-problem/Applesoft-BASIC/babbage-problem.basic
Normal file
17
Task/Babbage-problem/Applesoft-BASIC/babbage-problem.basic
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
100 :
|
||||
110 REM BABBAGE PROBLEM
|
||||
120 :
|
||||
130 DEF FN ST(A) = N - INT (A) * INT (A)
|
||||
140 N = 269696
|
||||
150 N = N + 1000000
|
||||
160 R = SQR (N)
|
||||
170 IF FN ST(R) < > 0 AND N < 999999999 THEN GOTO 150
|
||||
180 IF N > 999999999 THEN GOTO 210
|
||||
190 PRINT "SMALLESt NUMBER WHOSE
|
||||
SQUARE ENDS IN"; CHR$ (13);
|
||||
"269696 IS ";R;", AND THE
|
||||
SQUARE IS"; CHR$ (13);N
|
||||
200 END
|
||||
210 PRINT "THERE IS NO SOLUTION
|
||||
FOR VALUES SMALLER"; CHR$(13);
|
||||
"THAN 999999999."
|
||||
Loading…
Add table
Add a link
Reference in a new issue