Help for this page

Select Code to Download


  1. or download this
    my @units 
    my @teens 
    my @tens
    
  2. or download this
    my %number = (
    0 => zero, 1 => one, 2 => two, 3 => three, 4 => four, 5 => five, 6 => 
    +six, 7 => seven, 8 => eight, 9 => nine, 10 => ten, 11 => eleven, 12 =
    +> twelve, 13 => thirteen, 14 => fourteen, 15 => fifteen, 16 => sixtee
    +n, 17 => seventeen, 18 => eighteen, 19 => nineteen, 20 => twenty, 30 
    +=> thirty, 40 => forty, 50 => fifty, 60 => sixty, 70 => seventy, 80 =
    +> eighty, 90 => ninety);
    
  3. or download this
    if $number is a key in the hash, print its value, end of the history
    
    else you need to reduce the problem 
    ...
      print .......  %number[$thousand] $thousand_string %number[$hundred]
    + $hundred_str %number[$teen], %number[$unit];
    
    # and we close all with the required "}"