Tugas 2, Konsep dan Pemakaian Array

 

Konsep dan Pemakaian Array

An array is a data structure that stores one or more similar type of values in a single value. For example if you want to store 100 numbers then instead of defining 100 variables its easy to define an array of 100 length.

There are three different kind of arrays and each array value is accessed using an ID c which is called array index.

  • Numeric array − An array with a numeric index. Values are stored and accessed in linear fashion.

  • Associative array − An array with strings as index. This stores element values in association with key values rather than in a strict linear index order.

  • Multidimensional array − An array containing one or more arrays and values are accessed using multiple indices


1. ArrayAPP
 
Source code: 
output:





2. LowArray

Source code:
output:

3. HighArray

Source code: 
output:


4. OrderredArray

Source code: 
output:


5. Classdata Array

Source code: 
output:


Komentar

Postingan populer dari blog ini

ETS-PWEB B-O11-Laundriian