in reply to Perl Help
they have subscript values of 2, 4, 6, 8, 10but it's not correct! 20 is an even integer, for example, but does not have any of the subscripts in the specs. Maybe you'll want to use this definition:
they have subscript values of 2, 4, 6, 8, 0or better test for oddity using the remainder of an integer division by 2 (see the % operator in perlop).
I'd also suggest the professor to add "20" to the list of numbers - when you find a bug, add a test to the test suite.
Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')
Don't fool yourself.
|
|---|