✅ I want to make multiple array variables using a for loop, each with 4 items
But how do i do this?
17 Replies
say i wanted 10 lines, id like 10 variables:
person1
person2
all the way to person10 as arrays
but how?
That's not a thing
WHAT
You'll have to use nested arrays
could u hint how?
im pretty new to C#
An array of arrays basically
string[][]
jagged arrays yeah
uhhh
ok ill try i guess
or multidimensional array
but wait
the question is, why?
You can actually pretty easily turn your current code into using nested arrays
why are u trying to make multiple array variables
and what exactly does the 4 items represent?
i have an assignment which requires this
4 items are different things i need, and then i need to order all the arrays from highest to lowest
using one of the 4 items
sounds like you need to define a class, but if the assignment requires you to do what u said, ig there's no other option
we havent done classes yet tho so it isnt expected
welp thanks anyways
if they didnt teach you how to define multiple array variables then how do you expect to make one?
idk figure