Jump to content

Coprimes: Difference between revisions

Add BASIC
(Add 8086 Assembly)
(Add BASIC)
Line 243:
{{Out}}
<pre>{{17, 23}, {18, 29}}</pre>
 
=={{header|BASIC}}==
<lang basic>10 DEFINT A-Z
20 READ N
30 FOR I=1 TO N
40 READ P,Q
50 A=P
60 B=Q
70 IF B THEN C=A: A=B: B=C MOD B: GOTO 70
80 IF A=1 THEN PRINT P;Q
90 NEXT I
100 DATA 5
110 DATA 21,15
120 DATA 17,23
130 DATA 36,12
140 DATA 18,29
150 DATA 60,15</lang>
{{out}}
<pre> 17 23
18 29</pre>
 
=={{header|C}}==
2,114

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.