write a c++ program to find the divisors of a positive integer number 'n'. the program should accept input of the positive integer number from the user

Recommended Answers

That's not a question. What is your question? We only give homework kelp to those that show effort.

Jump to Post

All 2 Replies

That's not a question. What is your question? We only give homework kelp to those that show effort.

This is also the prime factorization problem - look it up. Every number is divisible by some number of primes. That's all the help you will get until you try solving the problem itself.

FWIW, I did this "exercise" as a mental problem about 30 years ago. Another reference - Goedel numbers. Also, prime factorization is key to breaking public key encryption algorithms. If you figure out a fast way to factorize a large (2048 bit or higher) number, the NSA will want to talk to you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.