M
MJS
After the execution of the following, the only value I need in
"number" should be any positive interger(i.e any whole numbers without
zero).
print "Please enter a natural number = ";
chomp( my $number = <STDIN> );
I need to throw an exception or inform the user when input is anything
(characters, real number, negative number etc.) other the positve
integer. Please help.
"number" should be any positive interger(i.e any whole numbers without
zero).
print "Please enter a natural number = ";
chomp( my $number = <STDIN> );
I need to throw an exception or inform the user when input is anything
(characters, real number, negative number etc.) other the positve
integer. Please help.