Positivity check
This commit is contained in:
parent
bfc1e60452
commit
d5d49af2bd
|
@ -6,7 +6,7 @@
|
|||
/* By: tosuman </var/spool/mail/tosuman> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/03/30 17:03:18 by tosuman #+# #+# */
|
||||
/* Updated: 2023/03/30 17:03:19 by tosuman ### ########.fr */
|
||||
/* Updated: 2023/04/01 02:18:35 by tischmid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -82,7 +82,7 @@ int ft_is_prime(int nb)
|
|||
int ft_find_next_prime(int nb)
|
||||
{
|
||||
--nb;
|
||||
while (++nb)
|
||||
while (++nb > 0)
|
||||
if (ft_is_prime(nb))
|
||||
return (nb);
|
||||
return (2);
|
||||
|
|
Loading…
Reference in New Issue