Program to find the array type (even, odd or mixed array) | faceprep

Program to find the array type (even, odd or mixed array) | faceprep

The program to find the array type (odd, even or mixed array) is discussed here. Given an array of integers, display the type of the array.

Program to find the array type (even, odd or mixed array)


Input format:

  • Input consists of 1 integer and 1 array.
  • The integer corresponds to the size of an array.

Sample Input:

5

2

4

1

3

5


Sample output:

Mixed

Algorithm to find the array type (even, odd or mixed array)

  • Input the number of elements of the array.
  • Input the array elements.
  • If all the elements of the array are odd, display “Odd”.
  • If all the elements of the array are even, display “Even”.
  • Else, display “Mixed”.

program to find the array typeClick here to learn more about FACE Prep PRO


Program to find the array type (even, odd or mixed array)

@@coding::1@@


Recommended Programs


https://www.faceprep.in/edge/?aff_id=4108

c