write a function named nval that take 2 integer argument and return 1 if they have same number of factors. retur -1 if is negtif | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

write a function named nval that take 2 integer argument and return 1 if they have same number of factors. retur -1 if is negtif

java code

22nd Jun 2019, 11:23 AM
Sifa Ngelelo
Sifa Ngelelo - avatar
2 Answers
+ 5
GoodLuck!
22nd Jun 2019, 11:23 AM
Jella
Jella - avatar
+ 1
Here is a code which calculates the prime factors of a number. https://code.sololearn.com/csnT45SvKGe1/?ref=app I don't know if there exists a formular to calculate the numbers of prime factors without calculating the prime factors.
22nd Jun 2019, 8:06 PM
Denise Roßberg
Denise Roßberg - avatar