Questions tagged as 'fibonacci'

2
answers

trying to generate a fibonacci sequence 0,1,1,2,3,5,8,13,21,34 with for loop and without the final comma

This is my code, if I do not put conditions I get everything but I add a final comma and trying to filter the last position of i with an if () omits the last two numbers. public class EjercicioFibonacci { public static void main(String[] a...
asked by 27.05.2018 / 16:25
2
answers

Doubt about Fibonacci

I have a little doubt with my code to carry out my Fibonacci program since at the time of printing the values it gives me the number but in negative. class doWhileTest{ public static void main(String[] args) { int primertermino = -...
asked by 14.08.2017 / 01:01