Compucolor.org – Virtual Media

Listing of file='RNDNUM.BAS;01' on disk='vmedia/utility-sector.ccvf'

3 PLOT 12:PLOT 29,18
10 REM  INT FUNCTION EXAMPLE
15 PRINT
20 PRINT "NUMBER TO BE ROUNDED:"
25 INPUT A
40 PRINT "NO. OF DECIMAL PLACES:"
45 INPUT D
60 B= INT (A* 10^ D+ .5)/ 10^ D
70 PRINT "NUMBER ROUNDED = ";B
80 GOTO 15