Simple program that checks if a number has same digits as its triple?
Hello, I'm trying to make a program that checks if a number has the same digits as its triple, so 16374, if its triple were 36471 would return true. The two numbers are put into a array and this is code to check it:
public static boolean check (intnumber, int third, int digits)
I've looked over it many times and tried for loops as well, but it seems that matches never ++ and always returns true if I set (matches==0).