- or download this
This program will ask you to type in two numbers and then add those nu
+mbers together.
It will then display the problem and the answer in word form.
...
Four plus four equals
Type in a single digit number between one and four, or type done to ex
+it.
done
- or download this
This program will ask you to type in two numbers and then add those nu
+mbers together.
It will then display the problem and the answer in word form.
...
Two plus four equals six
Type in a single digit number between one and four, or type done to ex
+it.
done
- or download this
#!/usr/bin/perl -w
use strict ;
...
# %nums2 = ("1"=>"One", "2"=>"Two", "3"=>"Three", "4"=>"Four", "5"
+=>"Five", "6"=>"Six", "7"=>"Seven", "8"=>"Eight", "9"=>"Nine") ;
# return $nums2{$userin2} ;
# }
- or download this
sub numtoword {
my $digit = shift;
my %nums;
%nums = ( "1"=>"one", "2"=>"two", "3"=>"three", "4"=>"four", "5"=>
+"five", "6"=>"six", "7"=>"seven", "8"=>"eight", "9"=>"nine" );
return $nums{$digit};