C
C#3y ago
Squirtle

Arrays

hey is it possible to make an array to start with 1 instead of 0 im trying to make a so the user puts in a number and the computer gives the month but 0 shouldnt be an alternative
8 Replies
Squirtle
SquirtleOP3y ago
any fixes?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Squirtle
SquirtleOP3y ago
true thanks
Chiyoko_S
Chiyoko_S3y ago
yeah generally in computer science it's an unspoken rule to have indices start from 0 there are languages that have non-zero based arrays but it's uncommon, I'd say it's better you get used to it instead
Hercules
Hercules3y ago
@Squirtle its better to get used to it as written below but if you use find method of array you can easily achieve what you want. The user doesn't need to know you have an array with 11 slots 0 to 11 indexes.
Chiyoko_S
Chiyoko_S3y ago
lmao
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server