/******************************************** * PRIME NUMBERS * * ----------------------------------------- * * This small program tests if a given inte- * * ger number is a prime number or not. * * ----------------------------------------- * * Ref.: "Mathématiques par l'informatique * * individuelle (1) par H. Lehning * * et D. Jakubowicz, Masson, Paris, * * 1982" [BIBLI 06]. * * * * C++ version by J-P Moreau. * * (www.jpmoreau.fr) * ********************************************/ //See also program factors.cpp #include #include //Labels: e100, fin double d,eps,i,m,n; void main() { eps=1e-6; printf("\n"); printf(" ? "); scanf("%lf",&n); printf("\n"); //Test if multiple of 2 d=n-2*int(n/2); if (fabs(d)