Checking for Extended Midy
cout << endl ; res = pow ( 10 , m ) - 1 ; if ( sum % res == 0 ) cout << " Extended ▁ Midy ' s ▁ theorem ▁ holds ! " ; else cout << " Extended ▁ Midy ' s ▁ theorem " << " ▁ doesn ' t ▁ hold ! " ; } else if ( l % 2 != 0 ) { cout << " The ▁ repeating ▁ decimal ▁ is " << " ▁ of ▁ odd ▁ length ▁ thus ▁ Extended ▁ " << " Midy ' s ▁ theorem ▁ is ▁ not ▁ applicable " ; } else if ( l % m != 0 ) { cout << " The ▁ repeating ▁ decimal ▁ can ▁ " << " not ▁ be ▁ divided ▁ into ▁ m ▁ digits " ; } }