/ Published in: Java
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
if (isbn.length() == 13 && isbn.indexOf("978") == 0)
{
isbn = isbn.substring(3,12);
int xsum = 0;
for (int i = 0; i < 9; i++)
{
}
xsum %= 11;
xsum = 11 - xsum;
switch (xsum)
{
case 10: x_val = "X"; break;
case 11: x_val = "0"; break;
}
isbn += x_val;
}
URL: http://www.eblong.com/zarf/bookscan/eantoisbn-java.txt
Comments
 Subscribe to comments
                    Subscribe to comments
                
                