On y est presque ?

This commit is contained in:
SombrAbsol
2024-01-24 19:19:15 +01:00
parent c6453b3a4c
commit 155d7bbe64
3 changed files with 21 additions and 52 deletions

View File

@@ -1,6 +1,5 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/* n = p * q => p et q sont des nombres premiers
e = pgcd(e,(p-1)(q-1))
@@ -28,7 +27,7 @@ int nombrePremier(long long int x)
return 0;
}
/* Test pour savoir si c'est un nombre premier */
for (int i = 2; i * i <= x; i++)
for (int i = 2; i < x; i++)
{
if (x % i == 0)
{