console.WriteLine("Enter ISBN:")
isbn = console.ReadLine()
loop until isbn.Length = 13
For i = 0 To isbn.Length - 3 step 2
total = total + CInt(isbn.Substring(i, 1))
for i = 1 to isbn.Length - 2 step 2
total = total + 3*CInt(isbn.Substring(i, 1))
checkdigit = 10 - (total MOD 10)
if checkdigit = Cint(isbn.Substring(12,1)) then
Console.WriteLine("ISBN is valid")
Console.WriteLine("ISBN is invalid")