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