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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.