0

(Need Help) my program gives all the factors of a any number using arrys.(let user decide the memory of the array not you)

I needed to create a program that gives the factor of any number that the user will input but i really have a problem in the program that i don't really see because i don't wan't to allocate a memory space to my arrays . https://code.sololearn.com/c4tBTTAdUmaH/?ref=app

5th Mar 2020, 5:52 AM
soulemanou kunchiefuh babanou
soulemanou kunchiefuh babanou - avatar
1 Odpowiedź
0
For a number n, factors count not exceed n/2. So you take n/2 size for array.. Using dynamic memory allocation methods from standards are best one.. Use pointer array and use malloc method dynamic allocation... Hope it helps you... Edit: see https://www.sololearn.com/Discuss/735736/?ref=app
5th Mar 2020, 8:46 AM
Jayakrishna 🇮🇳