this is my understanding of the statement above..

this will display the numbers from 0 to Mth value where N is the lucky number and M is the number od iterations

then the M modulo N should be equal to the value of (N/2)

the program below will result to

the M = 7 the M = 22 the M = 37 the M = 52 the M = 67 the M = 82 the M = 97 Number of Hits: 7

=============================================================

#include <stdio.h> int M_limit=100; //the Mth limit int N = 15; //your lucky number N int H_count=0; //number positive integers M void the_M(){ for(int a=1; a<M_limit; a++){ int M=a; if( (N%M) ==(N/2)){ //if we reverse M and N in the modulo the program will crash i dont know printf("the M = %d\n",a); //print the M value based from the formula above i think H_count++; // } } printf("\nNumber of Hits: %d\n",H_count); //print the number of integers of Ms } int main(){ the_M(); return 0; }

"N mod M?N/2"? I know`N mod M`

and`N / 2`

, but what does the`?`

mean in that expression?