83
HIGHER MATH
Your ATARI Computer is a fancy calculator. When you enter two
numbers into the program below, the computer will tell you their
greatest common denominator. For example, if you enter 690911 and
11214017, you'll soon discover that their greatest common
denominator is 53147.
10 ? CHR$(125) :? "Enter two numbers. Press Return after
each entry. "
20 INPUT N 1 , N 2
30 G O S U B 90
40 ? "Their GCD is "; :? AN
50 POKE 752,1:POSITION 10,10: ? "Press Start to
continue."
60 IF PEEK(53279)<>6 THEN GOTO 60
78 POKE 752,0:? CHR$(125) :GOTO 10
80 R E M ****SUBROUTINE****
90 A N = 0 : P O K E 195,0:TRAP 130: M=(N1>=N2)*N1+(N2>N1)*N2:
N=(M=N1)*N2+(M=N2)*N1
100 IF INT(N1)<>N1 OR INT ( N 2 ) < > N 2 THEN R E T U R N
110 P=M-INT ( M / N ) * N : M = N : N = P
120 IF P < > 0 THEN GOTO 110
130 AN=M*(PEEK(195)=0):RETURN
Содержание 65XE
Страница 1: ...ATARI 65XE PERSONAL COMPUTER OWNER S MANUAL TM...
Страница 3: ...ATARI 65XE PERSONAL COMPUTER TM...
Страница 6: ...Part 1 GettingStarted 1...
Страница 9: ...4...
Страница 23: ...18...
Страница 25: ...20...
Страница 32: ...Part 2 Programming withATARI BASIC 27...
Страница 33: ...28...
Страница 59: ...54...
Страница 69: ...64...
Страница 82: ...Part3 Appendices 77...
Страница 83: ...78...
Страница 97: ...92...
Страница 105: ...100...
Страница 125: ...120...
Страница 126: ...121 Index...
Страница 127: ...122...
Страница 134: ...ATARI 1987 Atari Corp All Rights Reserved Printed in Taiwan C072018 001 REV B K l 2 1987...
Страница 135: ......