<gouthampradhan>string_CountAndSay_1.java
public String countAndSay(int n) {
    String result = "1";
    for (int i = 1; i < n; i++) {
      int count = 1;
      char num = result.charAt(0);
      StringBuilder temp = new StringBuilder();
      for (int j = 1, l = result.length(); j < l; j++) {
        if (result.charAt(j) == num) {
          count++;
        } else {
          temp = temp.append(String.valueOf(count)).append(String.valueOf(num));
          num = result.charAt(j);
          count = 1;
        }
      }
      temp = temp.append(String.valueOf(count)).append(String.valueOf(num));
      result = temp.toString();
    }
    return result;
  }
public String var_0 ( int var_1 ) {
  String var_4 = "1" ;
  for ( int var_6 = 1 ;
  var_6 < var_1 ;
  var_6 ++ ) {
    int var_7 = 1 ;
    char var_10 = var_4 . charAt ( 0 ) ;
    StringBuilder var_12 = new StringBuilder ( ) ;
    for ( int var_13 = 1 , var_15 = var_4 . length ( ) ;
    var_13 < var_15 ;
    var_13 ++ ) {
      if ( var_4 . charAt ( var_13 ) == var_10 ) {
        var_7 ++ ;
      }
      else {
        var_12 = var_12 . append ( String . valueOf ( var_7 ) ) . append ( String . valueOf ( var_10 ) ) ;
        var_10 = var_4 . charAt ( var_13 ) ;
        var_7 = 1 ;
      }
    }
    var_12 = var_12 . append ( String . valueOf ( var_7 ) ) . append ( String . valueOf ( var_10 ) ) ;
    var_4 = var_12 . toString ( ) ;
  }
  return var_4 ;
}
