ARRAY INITIALIZATION 1 DIMENSIONS

Array is a group of similar data that is stored into a variable with the same name, by giving the index on the variable to distinguish between one another.

Array initialization 1 DIMENSIONS
Initialization can be done in conjunction with or separate declarations. initialization
an array is to put the array elements in parentheses
braces {}, among other elements that one with comma separated.
int bil [2] = {4,1,8}

bil [0] = 4
bil [1] = 1
bil [2] = 8

The following is a sample program in one-dimensional array, please be observed and understood :

# include <iostream>

void main () {

  bil float [6];
   court <<"\ t \ tSlamet Islan Al Hidayah" <<endl;
   court <<"\ t \ t 10018075" <<endl;
   court <<endl;
   court <<"Initializing Array 1 Dimension" <<endl;
   court <<endl;
   court <<"Enter data : " <<endl;

   for (int i = 0; i <6; i + +) {
     court <<"["<< i +1 <<"]";
     cin>> bil [i];
     }
     court <<endl;
     court <<"Displaying Data You Enter:" <<endl;
     for (int i = 0; i <6; i + +)
       court <<bil [i];
       }
 Output :


Well that's the program that I can make,,,,,!
If there are less jelass know any mistake, do not hesitate to leave a comment ataun advice. So that I can fix it later terimakasihh over his visit,,
Regards super ..

0 Response to " ARRAY INITIALIZATION 1 DIMENSIONS "