Professional Documents
Culture Documents
Topic6 Array2
Topic6 Array2
Array
• Array contain multiple elements, each element is of a
single type
arrayType array_name[array_size];
cin>>letter_array[j];
}
6/10/2020 hfmh2019 2
Example 2
• Create an array that contains 10 positive numbers
6/10/2020 hfmh2019 4
Sort the
elements of
Array
(ascending)
6/10/2020 hfmh2019 5
Exercise 1
• Write a loop statement that calculate summation of two array
elements and store the summation values into a new array.
• Write statement that check if an array element is a positive or
negative.
6/10/2020 hfmh2019 6
Problem 1
• Assume an array containing a list of random alphabets.
• Write a function that check if the array element is a vowel.
• Count the number of vowels found on an array
6/10/2020 hfmh2019 7