Wednesday , 18 January 2017
Home » Number Related Programs (page 3)

Number Related Programs

ISC 2013 [Question 1] Practical Paper Solved (ISBN Number)

An ISBN (International Standard Book Number) is a ten digit code which uniquely identifies a book. The first nine digits represent the Group, Publisher and Title of the book and the last digit is used to check whether ISBN is correct or not. Each of the first nine digits of the code can take a value between 0 and 9. Sometimes it is necessary to make the last digit equal to ten; this is done by writing the last digit of the code as X. To verify an ISBN, calculate 10 times the first digit, plus 9 times the second digit, plus 8 times the third and so on until we add 1 time the last digit. If the final number leaves no remainder when divided by 11, the code is a valid ISBN. Design a program to accept a ten digit code from the user. For an invalid input, display an appropriate message.

Read More »

Program for Generating Lucky Numbers (ISC 2001) – [Method 1]

This is the Java program for generating the Lucky Numbers within a given range. This is the 1st method, and it uses only one single dimensional array to generate the Lucky Numbers. Consider the sequence of natural numbers. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Removing every second number produces the sequences 1, 3, 5, 7, 9 Removing every third number produces the sequences 1, 3, 7,9 Removing every fourth number produces the sequences 1, 3, 7 Hence, The Lucky numbers less than 10 are: 1, 3, 7

Read More »

Program to Check for Kaprekar Number

Program in Java (BlueJ) to input a number and check whether it is a Kaprekar number or not. A Kaprekar number is a number, whose square is found out and the sum of the left and right part of its square (divided from its middle part) is equal to the number itself.

Read More »