static void Main(string[] args) { IBan Iban1 = new IBan("123456789100001987654321"); IBan Iban2 = new IBan("154643654365436546546541"); //"123456789100001987654321" CheckIBAN check = new CheckIBAN(); check.CheckPalindrome(Iban1); check.CheckPalindrome(Iban2); }
public void CheckPalindrome(IBan iban) { int number = Int32.Parse(iban.IBAN); if (p.Palindrome(number)) { Console.WriteLine("{0} este un palindrom!", iban.IBAN); } else { Console.WriteLine("{0} nu este un palindrom!", iban.IBAN); } }