Originally posted by GoonerSam
I'm a noob coder before you rage at me :embarrassed:
I just need help with how to make a check that makes sure a user cannot put a letter instead of a number?
Module Module1
Sub Main()
Console.WriteLine("Welcome, to the ISBN-code checker, v1.141.")
Console.WriteLine("Please Enter the first digit of your of your ISBN number")
Dim UserInput1 As Integer
Dim UserInput2 As Integer
Dim UserInput3 As Integer
Dim UserInput4 As Integer
Dim UserInput5 As Integer
Dim UserInput6 As Integer
Dim UserInput7 As Integer
Dim UserInput8 As Integer
Dim UserInput9 As Integer
Dim UserInput10 As Integer
UserInput1 = Console.ReadLine
Console.WriteLine("Enter the second digit")
UserInput2 = Console.ReadLine
Console.WriteLine("Enter the third digit")
UserInput3 = Console.ReadLine
Console.WriteLine("Enter the fourth digit")
UserInput4 = Console.ReadLine
Console.WriteLine("Enter the fifth digit")
UserInput5 = Console.ReadLine
Console.WriteLine("Enter the sixth digit")
UserInput6 = Console.ReadLine
Console.WriteLine("Enter the seventh digit")
UserInput7 = Console.ReadLine
Console.WriteLine("Enter the eigth digit")
UserInput8 = Console.ReadLine
Console.WriteLine("Enter ninth digit")
UserInput9 = Console.ReadLine
Console.WriteLine("Enter the tenth digit")
UserInput10 = Console.ReadLine
Console.WriteLine("------------------------")
Console.WriteLine(Math.Round((UserInput1 * 11) + (UserInput2 * 10) + (UserInput3 * 9) + (UserInput4 * 8 ) + (UserInput5 * 7) + (UserInput6 * 6) + (UserInput7 * 5) + (UserInput8 * 4) + (UserInput9 * 3) + (UserInput10 * 2)))
Console.ReadLine()
Dim iRemainder As Integer
iRemainder = ((UserInput1 * 11) + (UserInput2 * 10) + (UserInput3 * 9) + (UserInput4 * 8 ) + (UserInput5 * 7) + (UserInput6 * 6) + (UserInput7 * 5) + (UserInput8 * 4) + (UserInput9 * 3) + (UserInput10 * 2) Mod 11)
Console.WriteLine("Your REMAINDER is " & iRemainder Mod 11)
Console.WriteLine("To see your ISBN and CHECK DIGIT, press the enter key")
Console.ReadLine()
Console.WriteLine("Your ISBN code - INCLUDING the check digit is: " & UserInput1 & UserInput2 & UserInput3 & UserInput4 & UserInput5 * UserInput6 & UserInput7 & UserInput8 & UserInput9 & UserInput10 & (11 - (iRemainder Mod 11)))
Console.WriteLine("and your check digit is: " & (11 - (iRemainder Mod 11)))
Console.ReadLine()
End Sub
End Module
I just need a variable check... :hug: