~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to third_party/ply/example/BASIC/gcd.bas

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
10 PRINT "A","B","C","GCD"
 
2
20 READ A,B,C
 
3
30 LET X = A
 
4
40 LET Y = B
 
5
50 GOSUB 200
 
6
60 LET X = G
 
7
70 LET Y = C
 
8
80 GOSUB 200
 
9
90 PRINT A, B, C, G
 
10
100 GOTO 20
 
11
110 DATA 60, 90, 120
 
12
120 DATA 38456, 64872, 98765
 
13
130 DATA 32, 384, 72
 
14
200 LET Q = INT(X/Y)
 
15
210 LET R = X - Q*Y
 
16
220 IF R = 0 THEN 300
 
17
230 LET X = Y
 
18
240 LET Y = R
 
19
250 GOTO 200
 
20
300 LET G = Y
 
21
310 RETURN
 
22
999 END