Question: Write a program that counts double prime numbers and prints out perfect numbers within the given range. Input specification You will be given two numbers:

Write a program that counts double prime numbers and prints out perfect numbers within the given range. Input specification You will be given two numbers: n and m which are between 1 and 40,000. Output specification Show the number of double primes and print out the perfect numbers within the given range. If there is no double prime number, then show 0 (zero). a. Write a function, named check_prime(), that will return 1 if a number is prime and 0 otherwise.(5 pts) b. Write a function, named prime_digit(), that will return 1 if all digits of a number are prime and 0 otherwise.(6 pts) c. Write a function, named perfect_num(), that will return a perfect number. d. Write a main function by invoking (calling) all the functions above to find how many numbers are double prime numbers and print out perfect numbers between two given numbers : n, m.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!