Why this code of Prime numbers is not working (link given below)?? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

Why this code of Prime numbers is not working (link given below)??

https://code.sololearn.com/cvczs2eM96DJ

2nd Aug 2019, 7:45 AM
Diptaraj Sen
Diptaraj Sen - avatar
1 Respuesta
0
Variable rem is instantiated inside a loop, therefore it cannot be reached outside of it. Moving it outside the loop will fix the compilation error, but will not give the correct results.
2nd Aug 2019, 8:08 AM
Rohbot