Jump to content

Ethiopian multiplication: Difference between revisions

no edit summary
No edit summary
Line 768:
90 WEND
100 PRINT "=", TOT</lang>
 
==={{header|IS-BASIC}}===
{{incorrect|IS-BASIC|No named functions}}
<lang IS-BASIC>100 LET X=17:LET Y=34:LET TOT=0
110 DO WHILE X>=1
120 PRINT X,
130 IF MOD(X,2)<>0 THEN
140 LET TOT=TOT+Y
145 PRINT Y
150 ELSE
160 PRINT Y;"(struck)"
170 END IF
180 LET X=INT(X/2):LET Y=2*Y
190 LOOP
200 PRINT " =",TOT</lang>
 
==={{header|Liberty BASIC}}===
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.