Professional Documents
Culture Documents
1_D arrays
1. Write a program that read N numbers from the user in an array of integers, then prints the
number of elements that are divisible by 2, 3 and 5.
2. Write a program that read N numbers from the user in an array of integers, then puts even &
odd elements of the array in 2 separate arrays.
3. Write a program to read N numbers from the user in an array of integers, and prints the
following:
a. Sum of all elements.
b. Maximum element.
c. Minimum element.
d. Average of all elements.
e. Numbers above average.
f. Print the array in reverse order.
g. Count the number of occurrences of the first element.
6. Write a program that reads two 2_arrays of size 3X4 of integers then perform their addition in
a third one and print it.
7. Write a program that reads integer values in a 2_D array of size 2x3 then find its transpose.