0

i have recently started to learn c programming. while learning i came across a problem in which we are supposed to find the product of divisor of numbers of range upto 10^6.
so, plz if someone can give me any direction on this problem.

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by ankushbansal89
0

Well if you can't calculate those number using your standard compiler use a library such as the GMP etc.

0

iamthwee is right but if the intention of your tutor is to make you try such things by using programming constructs then you may try using linked list to solve your problem.

0

iamthwee is right but if the intention of your tutor is to make you try such things by using programming constructs then you may try using linked list to solve your problem.

linked list is a good option but main problem is how to compute divisors for such a large numbers. For numbers upto the range 10^3 we can compute by check all number starting from 2 to [number/2]....


But for number greater then 10^3 complexity increase and acc. to me it is not a good approach .

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.