Why is this code not working
I'm trying to get the prime numbers of a number using this method but it's not working. https://code.sololearn.com/cmBq7PYlz6RT/?ref=app
it is just prime(10); And You printing only when if (x % y != 0 && x == y) Which is never going to true since x%y! =0 then it never x==y..
Prime is a function with a parameter you must use it like prime(10); https://code.sololearn.com/c6WOBy9x3XAa/#cs try that
How i am suppose to fix it now
Joseph Oritseweyinmi actually what are you trying here.. What prime numbers of a number..? Example? Prime factors or factors of a number..?
I'm trying to get the prime factors of 10
How to read this?
How does this works?
Class and instance attributes