C
C#2y ago
damn

how i can write words in arrays [Answered]

i wanna write words after numbers
17 Replies
Mango
Mango2y ago
@cupck Are you trying to write something like this in a file 1) Sentence
damn
damn2y ago
yea
Mango
Mango2y ago
What results are you seeing when you test your code
damn
damn2y ago
Mango
Mango2y ago
So this is saying that i is either greater than or equal to the length of the array Array indices (which i is an index here) start at 0, so the max index you can have is the length minus 1 Look at your for statement
damn
damn2y ago
one minute pls
damn
damn2y ago
damn
damn2y ago
like this ?
Mango
Mango2y ago
Not quite Better though Your index i can still be equal to the length of the array, the max index is length - 1
damn
damn2y ago
omg it worked im so happy thank you very much
Mango
Mango2y ago
Did you remove the = sign?
damn
damn2y ago
yes
Mango
Mango2y ago
Perfect Then your output formatting doesn't matter, can write i+1 if you want in the stream writer so it starts at 1
damn
damn2y ago
yea i got it thank again
Mango
Mango2y ago
No problem
damn
damn2y ago
i never forget u you save my life I've been trying to fix this for two days
Accord
Accord2y ago
✅ This post has been marked as answered!