Positivity check

This commit is contained in:
Timo Schmidt 2023-04-01 02:18:43 +02:00
parent bfc1e60452
commit d5d49af2bd
1 changed files with 2 additions and 2 deletions

View File

@ -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);