Skip to content
Advertisement

Variable inside array not updating its value in Java

I was taking a shot at the FizzBuzz problem and decided to use an array to store the first 15 results in array and then iterate through it. But the variable stored in array is not updating its value if updated later in the loop

JavaScript

The variable I does not change its value in the for-loop. It just prints empty spaces in the result for the I variable. HeLp !

P.S: Is this a good implementation with respect to naive soln?

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement