More Loop Exercise - 52

Problem Set 4.2.1: Loop - Number/Digit (Class)

  1. Number Theory

    1. Print Divisors/Factors of a Number.

  2. Digit

    1. Count the number of Digits in an integer number.

  3. G.C.D/L.C.M

    1. Calculate the GCD of two numbers.

    2. Calculate the GCD of two numbers using the Euclid Algorithm.

Problem Set 4.2.2: Loop - Number/Digit (Class) [52]

  1. Number Theory

    1. Print the Divisors (নিঃশেষে বিভাজ্য, গুণনীয়ক) (Factors, উৎপাদক) of an Integer Number.

    2. Print the Proper Divisors/Factors of an Integer Number.

    3. Count the Total Number of Factors/Divisors of an Integer Number.

    4. Determine whether an Integer Number is prime or not.

    5. Print the prime numbers up to N.

    6. Print the Even Divisors/Factors of an Integer Number.

    7. Print the Odd Divisors/Factors of an Integer Number.

    8. Determine the Summation of Divisors/Factors of an Integer Number.

    9. Determine the Summation of Proper Divisors/Factors of an Integer Number.

    10. Test whether an Integer Number is a Perfect Number or not.

    11. Classify an Integer Number as a Perfect, Abundant, or Defective Number.

    12. Test whether an Integer Number is an Amicable Number or not. [sopd(a)==b&&sopd(b)==a]

    13. Calculate nCr

    14. Calculate nPr

  2. Digit

    1. Print the digit of an integer number in reverse order.

    2. Count the number of Digits in an integer number.

    3. Find the Summation of Digits of a number.

    4. Find the Product of Digits of a number.

    5. Find the Summation of Digits of a number until the summation forms one digit.

    6. Reverse the digits of an integer number.

    7. Test whether an integer number is Palindrome or not.

    8. Print a Number in words.

    9. Test whether an Integer Number is an Armstrong Number or not. [153=1^3+5^3+3^3, 1634=1^4+6^4+3^4+4^4]

    10. Test whether an Integer Number is a Strong Number or not. [145=1!+4!+5!=1+24+120]

  3. Number System Conversion

    1. Decimal to Binary

    2. Decimal to Octal

    3. Decimal to Hexadecimal

    4. Decimal to N Base Number System

    5. Binary to Decimal

    6. Binary to Octal

    7. Binary to Hexadecimal

    8. Octal to Binary

    9. Octal to Decimal

    10. Octal to Hexadecimal

    11. Hexadecimal to Binary

    12. Hexadecimal to Octal

    13. Hexadecimal to Decimal

    14. N Base Number System to Binary

    15. N Base Number System to Octal

    16. N Base Number System to Decimal

    17. N Base Number System to Hexadecimal

    18. N Base Number System to M Base Number System

  4. G.C.D/L.C.M

    1. Find the GCD of two numbers without using the Euclid Algorithm.

    2. Find the LCM of two numbers.

    3. Calculate the GCD of two numbers using the Euclid Algorithm.

    4. Test whether two numbers are Co-Prime or not. [if GCD (a, b) == 1, then a and b are Co-Prime]

    5. Euler Totient Function(phi). (# of Co-Prime from 1 to N for the input N)

    6. Find the GCD of N numbers.

    7. Find the LCM of N numbers.

  5. Other

    1. Calculate a^b using loop

    2. Calculate a^b % c using loop

    3. Calculate sqrt(a) using loop

Last updated