Validating isbn 10 c


My logic is that each number multiplied by it's radix, when summed will be divisible by 11. So I added print statements, and I can't understand why I am getting this output.

validating isbn 10 c-14validating isbn 10 c-5validating isbn 10 c-31

Compatibility with existing HTML user agents is possible by following a small set of guidelines.

This document is the second edition of the XHTML 1.0 specification incorporating the errata changes as of 1 August 2002.

Additional note: Because the last digit of the ISBN is used as a sort of checksum for the prior digits, regular expressions alone cannot $isbns = array( 'ISBN:1234567890', // 10-digit 'ISBN:123456789X', // 10-digit ending in X 'ISBN:1234567890123', // 13-digit 'ISBN:123456789012X', // 13-digit ending in X 'ISBN:1234' // invalid ); function get_isbn($str) foreach ($isbns as $str) @mk_89, I do not intend to offend you.

Wikipedia does not seem to suggest that a "mixture of numbers and letters" is valid. This is assuming that you want to match them as a part of any string, that is (your example has an extra "ISBN:" at the start so matching anywhere in a string seems to be a requirement of some sort) //Replace all the fluff that some companies add to ISBNs $str = preg_replace('/(\s |:|-)/', '', $str); if(preg_match("/^ISBN\d(?

Code Updated public class isbn { //attributes private string isbn Num; //method public string Get Isbn() //constructor public isbn() //end default constructor //method public string display ISBN() public static void Main(string[] args) //end main This is the check digit code the professor provided in class we just have to mesh it up to get it to work. Paste into your application, and you can see what's happening. Either way, leave a comment, and we can get it sorted out for you.