If all conditions are met , it proves Extended Midy 's theorem
void ExtendedMidys ( string str , int n , int m ) { if ( ! isPrime ( n ) ) { cout << " Denominator ▁ is ▁ not ▁ prime , ▁ " << " thus ▁ Extended ▁ Midy ' s ▁ " << " theorem ▁ is ▁ not ▁ applicable " ; return ; } int l = str . length ( ) ; int part1 = 0 , part2 = 0 ; if ( l % 2 == 0 && l % m == 0 ) {