home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG084.ARC
/
SQUARES.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
1KB
|
66 lines
eras
set talk off
?'do you want printout'
SET CONS OFF
WAIT TO F
SET CONS ON
STOR 'T' TO MORE
DO WHIL MORE
STOR 'T' TO T
inpu'WHAT NUMBER?-ZERO TO QUIT'to a
IF A=0
SET TALK ON
RETU
ENDIF
inpu'TO WHAT POWER DO YOU WISH TO SEE IT RAISED?'to b
stor a to c
stor 1 to e
stor 0 to d
if !(F)='Y'
set prin on
endi
?' THE POWER OF MATHEMATICS'
set prin off
?' accurate to ten numbers only!'
?' ------------------------'
? A,'TO THE POWER OF 1 =',A
set prin off
do whil b>1
set exact on
stor a*c to c
stor c+d to d
stor b-1 to b
stor 1+e to e
if !(F)='Y'
set prin on
endif
? A,'TO THE POWER OF ',e,'=', c
endif
IF B=1
?
?' ------------------------'
?
ENDIF
set prin off
set exact off
enddo
ENDDO
SET TALK ON
RETU
set cons off
wait to third
set cons on
do whil !(third) # 'G'
?'You didn`t press G - try again!'
set cons off
wait to third
set cons on
enddo
? chr(7)
endif
STOR 1+note TO NOTE
if no