0% found this document useful (0 votes)
184 views2 pages

ICSE Class 10 Java Number Programs

Uploaded by

sidshah925
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
184 views2 pages

ICSE Class 10 Java Number Programs

Uploaded by

sidshah925
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ICSE Class 10 Computer Applications - Java Number Program Questions

1. Check Armstrong Number

Write a program to input a number and check whether it is an Armstrong number or not.

(Example: 153 = 1^3 + 5^3 + 3^3)

2. Prime Number Check

Accept a number from the user and check whether it is a prime number or not.

3. Reverse a Number

Write a program to input a number and print its reverse. (Example: 1234 -> 4321)

4. Palindrome Number

Input a number and check whether it is a palindrome. (Example: 121, 1331)

5. Perfect Number

Accept a number and check whether it is a Perfect Number.

(Example: 28 = 1 + 2 + 4 + 7 + 14)

6. Automorphic Number

Accept a number and check whether it is an automorphic number or not.

(Example: 76 -> 76^2 = 5776)

7. Fibonacci Series (N terms)

Write a program to print the first N terms of the Fibonacci series.

(Example: 0, 1, 1, 2, 3, 5, 8...)

8. Sum of Digits

Write a program to input a number and print the sum of its digits. (Example: 123 -> 6)

9. HCF and LCM

Accept two numbers and find their HCF (GCD) and LCM using loops.

10. Display All Prime Numbers in a Range

Input two numbers and print all the prime numbers between them.

Page 1
ICSE Class 10 Computer Applications - Java Number Program Questions

11. Disarium Number Check

A number is Disarium if sum of its digits powered with their position is equal to the number.

(Example: 135 = 1^1 + 3^2 + 5^3 = 135)

12. Strong Number Check

A Strong number is one whose sum of the factorial of digits is equal to the number.

(Example: 145 = 1! + 4! + 5! = 145)

Page 2

Common questions

Powered by AI

A Strong Number is characterized by its digits' factorial sums equating the number itself, diverging from a regular sum which only adds the digits. For example, 145 is a Strong Number since 1! + 4! + 5! equals 145, introducing factorial iteration that emphasizes multiplicative tallying over mere additive aggregation .

The Fibonacci series follows a recursive pattern where each term is the sum of the two preceding ones, demonstrating exponential growth with successive summation. Initially, it begins with 0 and 1, leading to subsequent terms like 1, 2, 3, 5, 8, etc., illustrating this principle of increasing order through accumulative addition .

Both Disarium and Strong numbers derive their unique properties from symmetrical calculations involving their digits. Disarium numbers leverage positional variance via power functions, while Strong numbers utilize factorials to scale sums. Both thus exhibit symmetry through structured accumulation—emphasizing positional and factorial impacts, respectively .

An Armstrong number is a number that equals the sum of its own digits each raised to the power of the number of digits. For example, the calculation for 153 as an Armstrong number is 1^3 + 5^3 + 3^3 = 153, which distinguishes it from a regular sum of digits calculation like 1 + 5 + 3, which would yield 9 .

A Disarium number differs by involving positional exponentiation in its digit sum, unlike absolute summation or factorial aggregation in Armstrong or Strong numbers. For instance, 135 is Disarium as 1^1 + 3^2 + 5^3 = 135, integrating positional consideration with power operations in evaluating numeral symmetry .

A perfect number equals the sum of its proper divisors, excluding itself. For example, 28 is perfect because its divisors 1, 2, 4, 7, and 14 sum up to 28. Perfect numbers are characterized by this balance—matching their divisor sum alone—highlighting a unique numerical property based on divisor relationships .

Efficiently identifying prime numbers across a range involves iterating over each number and applying divisibility checks up to the square root, rejecting composites swiftly. Directively, prime flags ensure numbers with any divisors are skipped early, ensuring minimal redundancy and allowing focused parsing within the range .

A number is automorphic if its square ends in the same digits as the number itself. For instance, 76 is automorphic because when squared, it results in 5776, ending in 76. The process to determine this involves squaring the number, converting both to strings, and verifying if the string of the squared number ends with the original number's string .

The HCF (GCD) is calculated using the Euclidean algorithm, which is efficient as it repeatedly reduces the problem size. The LCM is then deduced from the HCF using the relation LCM(a, b) = |a * b| / HCF(a, b). By combining loops to iterate through divisor checks and utilizing these mathematical shortcuts, the method ensures optimal computational efficiency .

Checking for a palindrome involves determining if a number reads the same forwards and backwards. Reversing a number changes its digit order but does not implicitly determine if it's a palindrome. A number is a palindrome if reversing it yields the original number, thus linking these concepts through symmetry .

You might also like