Skip to main content
Commonmark migration
Source Link

#Java 7, 69 bytes

Java 7, 69 bytes

String c(int n,String a,String b){return n--<1?"":a+"\n"+c(n,b,a+b);}

ungolfed

 class fibb {


public static void main(String[] args) {
    System.out.println( c( 7, "a" , "b" ) );

}
static String c(int n,String a,String b) {
    
    return n-- < 1  ? "" : a + "\n" + c(n,b,a + b);
    
}
}

#Java 7, 69 bytes

String c(int n,String a,String b){return n--<1?"":a+"\n"+c(n,b,a+b);}

ungolfed

 class fibb {


public static void main(String[] args) {
    System.out.println( c( 7, "a" , "b" ) );

}
static String c(int n,String a,String b) {
    
    return n-- < 1  ? "" : a + "\n" + c(n,b,a + b);
    
}
}

Java 7, 69 bytes

String c(int n,String a,String b){return n--<1?"":a+"\n"+c(n,b,a+b);}

ungolfed

 class fibb {


public static void main(String[] args) {
    System.out.println( c( 7, "a" , "b" ) );

}
static String c(int n,String a,String b) {
    
    return n-- < 1  ? "" : a + "\n" + c(n,b,a + b);
    
}
}
added 3 characters in body
Source Link
Numberknot
  • 935
  • 6
  • 10

#Java 7, 69 bytes

String c(int n,String a,String b){return n--<1?"":a+"\n"+c(n,b,a+b);}

usageungolfed

 class fibb {


public static void main(String[] args) {
    System.out.println( c( 7, "a" , "b" ) );

}
static String c(int n,String a,String b) {
    
    return n-- < 1  ? "" : a + "\n" + c(n,b,a + b);
    
}
}

#Java 7, 69 bytes

String c(int n,String a,String b){return n--<1?"":a+"\n"+c(n,b,a+b);}

usage

 class fibb {


public static void main(String[] args) {
    System.out.println( c( 7, "a" , "b" ) );

}
static String c(int n,String a,String b) {
    
    return n-- < 1  ? "" : a + "\n" + c(n,b,a + b);
    
}
}

#Java 7, 69 bytes

String c(int n,String a,String b){return n--<1?"":a+"\n"+c(n,b,a+b);}

ungolfed

 class fibb {


public static void main(String[] args) {
    System.out.println( c( 7, "a" , "b" ) );

}
static String c(int n,String a,String b) {
    
    return n-- < 1  ? "" : a + "\n" + c(n,b,a + b);
    
}
}
Source Link
Numberknot
  • 935
  • 6
  • 10

#Java 7, 69 bytes

String c(int n,String a,String b){return n--<1?"":a+"\n"+c(n,b,a+b);}

usage

 class fibb {


public static void main(String[] args) {
    System.out.println( c( 7, "a" , "b" ) );

}
static String c(int n,String a,String b) {
    
    return n-- < 1  ? "" : a + "\n" + c(n,b,a + b);
    
}
}