Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2
One way to think of arrays is like regular variables. int a0, a1, a2, a3, a4, a5, a6, a7, a8, a9; is identical to the following: int a[10]; you can reference them individually like: a[7] = a7; a[5] = a5; The main advantage to arrays is using loops to access them. I've included all my array and pattern codes, which have reasonable comments so should help you understand them. https://code.sololearn.com/c9c17qrFsFZ1 https://code.sololearn.com/cpXOvM9U4w80 https://code.sololearn.com/cAuablJG3TRE https://code.sololearn.com/cNI2QYCm2KKc https://code.sololearn.com/cwDnUNGbcc1m https://code.sololearn.com/cZJlptyFC3VB https://code.sololearn.com/cXwd3fTP5N95 https://code.sololearn.com/cK2TmeNjXe1q
22nd Jan 2018, 1:21 AM
John Wells
John Wells - avatar