TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Avuya Mxoli
NA
236
209k
I am working on a project where we have to provide pseudocode as part of the problem solving strategy
Mar 30 2011 1:08 PM
I am a 2nd year student and I am working on a Technical Programming project where we are asked to solve a problem about ISBNs. I am now at a step where I have to verify with someone else that my pseudocode works, hence I joined the forum. Basically here I am validating that an ISBN is correct. This is how I made my pseudocode using knowledge from other sites as well. To give some background knowledge, an ISBN is divided into 4 parts seperated by a hyphen: group code, publisher's code, number of the book title and the check digit. example of a 10 digit ISBN: 0-14-012499-3. You can use this or any ISBN of a text book you have to validate my pseudocode
Display 'Enter a 10 character ISBN'
GET ISBN
total = 0;
FOR counter GOES FROM 1 TO 9//represents the 9 characters excluding the check digit
thisDigit = character 'counter' of 'ISBN';//each character of the ISBN
total = total + thisDigit;//checks the 9 characters of ISBN
END FOR
checkDigit = 10th character of ISBN;
remainder = 11-(total / 11);// this is the formular to calculate the check digit
calculatedCheckDigit = 11 - remainder;
IF(calculatedCheckDigit = 10)
calculatedCheckDigit = 'X';
END IF
IF(calculatedCheckDigit = checkDigit)
Display('ISBN is valid')
Thank you
Reply
Answers (
4
)
India Vs. Pakistan
CONGRATULATIONS INDIA