Skip to content

Demonstration of how to get number from user input. Can convert numbers up to base 36 (digits 0-9 and characters A-Z).

License

Notifications You must be signed in to change notification settings

daelsepara/zil-numbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zil-numbers

Demonstrates how to get numbers from user input using READLINE. It can also be used with different bases, e.g. base 2, 10, 16, etc, up to base 36 (using characters a-z for numbers greater than 10)

POWER (BASE EXP)

  • Computes BASE^EXP (or BASE to EXP-th power)
  • Can only handle positve values for EXP and 0.
  • Recursive

CONVERT-TO-NUMBER (N "OPT" BASE)

  • Converts the N-th word of the user input to integer. To be used after calling READLINE
  • If BASE is not provided, it defaults to 10.
  • actual conversion is done by GET-DIGIT and TO-INTEGER routines

About

Demonstration of how to get number from user input. Can convert numbers up to base 36 (digits 0-9 and characters A-Z).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published