Compilation Error... | Sololearn: Learn to code for FREE!


Compilation Error...

Hi, I wrote the following code on my PC and it gave me no errors, but when I re-wrote it in SoloLearn it tells me there was a compilation error... the code checks if a given number is Prime or not could anyone help me understand why is that?

4/5/2018 9:02:56 PM

David Wicker

3 Answers

New Answer


There are a couple of ; missing, and the last return should be inside the last function. And even then, it tells me that 5 is not a prime. Oh, and I forgot the illegal characters, as Gordie said


thank you very much, I was able to fix the issue. Now it is working, and correctly returns 5 is Not a prime number.