Data update
This commit is contained in:
parent
72eb4943cb
commit
4d5544505c
2347 changed files with 62432 additions and 16731 deletions
10
Task/Map-range/QBasic/map-range.basic
Normal file
10
Task/Map-range/QBasic/map-range.basic
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
REM Map range
|
||||
DECLARE FUNCTION MapRange (S, A1, A2, B1, B2)
|
||||
FOR I = 0 TO 10
|
||||
PRINT USING "## maps to ##.#"; I; MapRange(I, 0, 10, -1, 0)
|
||||
NEXT I
|
||||
END
|
||||
|
||||
FUNCTION MapRange (S, A1, A2, B1, B2)
|
||||
MapRange = B1 + (S - A1) * (B2 - B1) / (A2 - A1)
|
||||
END FUNCTION
|
||||
Loading…
Add table
Add a link
Reference in a new issue