[Solved] JAVA ISBN-10 Number: Find 10th digit [closed]
nextInt() consumes the entire token 013601267, not just a single digit, which was not your plan. A much easier approach could be to consume it as a single string and then iterate over the characters: String num = s.next(); int sum = 0; for (int i = 1; i <= num.length(); ++i) { sum += … Read more