<gouthampradhan>math_Base7_1.java
public String convertToBase7(int num) {
    Integer.toString(7, 7);
    if (num == 0) return "0";
    int q = Math.abs(num), r;
    StringBuilder sb = new StringBuilder();
    while (q != 0) {
      r = q % 7;
      sb.append(r);
      q /= 7;
    }
    if (num < 0) {
      return "-" + sb.reverse().toString();
    } else return sb.reverse().toString();
  }
public String var_0 ( int var_1 ) {
  Integer . toString ( 7 , 7 ) ;
  if ( var_1 == 0 ) return "0" ;
  int var_9 = Math . abs ( var_1 ) , var_10 ;
  StringBuilder var_12 = new StringBuilder ( ) ;
  while ( var_9 != 0 ) {
    var_10 = var_9 % 7 ;
    var_12 . append ( var_10 ) ;
    var_9 /= 7 ;
  }
  if ( var_1 < 0 ) {
    return "-" + var_12 . reverse ( ) . toString ( ) ;
  }
  else return var_12 . reverse ( ) . toString ( ) ;
}
