text: Q:
  
  Way to get number of digits from a long using Modulos
  
  My ta told me that if i want to count the length of a long variable I can create a method using modulos. From what I understood he was saying that i need to keep using modulos until the long is 0. Here's what I'm thinking right now, but i'm pretty lost. 
  public static int inputSize(long cc_num)
  {
    int count = 0;
    while( cc_num > 0) 
      {
       count += 1;
       cc_num = cc_num % 10;
      }
  }
  
  A:
  
  Here is your code with minor changes:
  public static boolean validSize(long cc_num) {
    int count = 0;
    if (cc_num < 0)  cc_num *= -1; // fix negative number
  
    while (cc_num > 0) {
      count++;
      cc_num = cc_num / 10;
    }
  
    //checks if length of long is correct
    return count == 15 || count == 16;
  }
  
  Let me know if this works for you.
  
  