daelsepara / zil-numbers

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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).

License:MIT License


Languages

Language:ZIL 93.9%Language:Makefile 6.1%