Ad
Code
Diff
  • public class Kumite {
      public static boolean IsThree(int x) {
        while(x > 0) {
          if(x % 10 == 3) 
            return true;
          x /= 10;
        }
        return false;
      }
    }
    • public class Kumite {
    • public static bool IsThree(int x) =>
    • x.ToString().Contains('3');
    • public static boolean IsThree(int x) {
    • while(x > 0) {
    • if(x % 10 == 3)
    • return true;
    • x /= 10;
    • }
    • return false;
    • }
    • }