Using the functional programming language RACKET solve the following problem: The prime-factors function takes an intege
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Using the functional programming language RACKET solve the following problem: The prime-factors function takes an intege
Using the functional programming language RACKET solve the following problem: The prime-factors function takes an integer n as input (n ¿O) and returns a list containing the prime factors of n in ascending order. Prime factors are the prime numbers that divide a number exactly. If all the prime factors are multiplied, the original number is obtained. Examples: (prime-factors 1) → () (prime-factors 6) → (23) (prime-factors 96) → (2 2 2 2 2 3) (prime-factors 97) (97) (prime-factors 666) → (2 3 3 37)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!