+ 1

Is it possible to find prime number without using loops?

Just to use if else statement, c programming language.

8th Nov 2022, 4:28 PM
Ahmad Ishaq
Ahmad Ishaq - avatar
3 Respuestas
+ 2
Just try to use in add the recursion.
8th Nov 2022, 4:42 PM
JaScript
JaScript - avatar
+ 2
from sympy import isprime as p k=int(input()) if not p(k): print('Not',end=' ') print('A Prime Number') In python it's possible with some function but actually we can't check for a number to be prime without a loop or recursion
8th Nov 2022, 5:13 PM
Random
Random - avatar
+ 2
Ahmad Ishaq this is an example with above mentioned methode: https://code.sololearn.com/cTA290NqBX8W/?ref=app
22nd Jun 2023, 6:39 PM
JaScript
JaScript - avatar