Method generated Array printing.
How can I print the array this function returns and is the code problematic?
15 Replies
You can
string.Join()
the output of this method and print that. Or JsonSerializer.Serialize()
it
Other than that, it's finehow can I skip the iteration while i=0 seems like my current logic doesn't work
You can start the loop from 1 if you want
for (int i = 1; i < length; i++)
There, fixed itNotice
i = 1
in my example, not i = 0
here is the current code
i already updated it to 1
So it should not be outputting 0 as the first element
Contrary to your screenshot
yes thats where I'm confused.
Angius
REPL Result: Success
Result: int[]
Compile: 315.803ms | Execution: 38.429ms | React with ❌ to remove this embed.
Huh
Angius
REPL Result: Success
Result: int[]
Compile: 316.647ms | Execution: 36.448ms | React with ❌ to remove this embed.
There we go, almost there
Angius
REPL Result: Success
Result: int[]
Compile: 364.743ms | Execution: 36.200ms | React with ❌ to remove this embed.
This works
lmao I forgot about here and solved it myself XDD
thanks for your help