Programs on Numbers using Java language for ICSE and ISC students are posted here. The programs can be executed on BlueJ or any other editors. Here you will get links to number of programs along with explanation. Hope it will help students.
To view the programs, click on the links
Armstrong Number (2)
An Evil number is a positive whole number which has even number of 1’s in its binary equivalent.
Example: Binary equivalent of 9 is 1001, which contains even number of 1’s.
Thus, 9 is an Evil Number.
Example: Binary equivalent of 9 is 1001, which contains even number of 1’s.
Thus, 9 is an Evil Number.
A few Evil numbers are 3, 5, 6, 9....
Keith Number
Pythagorean Triplets
Longest Gap Between Two Non Prime Numbers (Using Array)
Longest Gap Between Two Non Prime Numbers (Without Array)
A Prime-Adam integer is a positive integer (without leading zeros) which is prime as well as an Adam number.
Prime number: A number which has only two factors, i,e 1 and the number itself.
Example: 2,3,5,7 etc
Adam number: The square of a number and the square of it's reverse are reverse to each other.
Example: If n=13 and reverse of 'n'=31 then square of 13 = 169 and square of 31 is 961 which is reverse of 169.
Thus 13 is an Adam number
Prime number: A number which has only two factors, i,e 1 and the number itself.
Example: 2,3,5,7 etc
Adam number: The square of a number and the square of it's reverse are reverse to each other.
Example: If n=13 and reverse of 'n'=31 then square of 13 = 169 and square of 31 is 961 which is reverse of 169.
Thus 13 is an Adam number
A number is called Smith Number if sum of the digits of the number is equal to the sum of the digits of the prime factors of the number are equal.
Sample Input: 666
Sum of the digits: 6 + 6 + 6 = 18
Prime factors are: 2, 3, 3, 37
Sum of the digits of the prime factors: 2 + 3 + 3 + (3 + 7) = 18
Thus, 666 is a Smith Number.
Sum of the digits: 6 + 6 + 6 = 18
Prime factors are: 2, 3, 3, 37
Sum of the digits of the prime factors: 2 + 3 + 3 + (3 + 7) = 18
Thus, 666 is a Smith Number.
Twist Number
Weak Arm Number
Unusual number : In Mathematics, an unusual number is a natural number whose greatest prime factor is strictly greater than square root of n.
The first few unusual numbers are –
2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 20, 21, 22, 23, 26, 28, 29, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 46, 47, 51
2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 20, 21, 22, 23, 26, 28, 29, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 46, 47, 51
Ugly numbers are positive numbers whose only prime factors are 2, 3 or 5. First 10 ugly numbers are 1, 2, 3, 4, 5, 6, 8, 9, 10, 12. By convention, 1 is included.
Test Date:Input an integer number: 235
Output : It is not an ugly number.
To Get More Programs:
ISC Practical Papers With Solution
ISC Theoretical Papers With Solution
ICSE Theoretical Papers With Solution
No comments:
Post a Comment