Computer Science, asked by jamunadevi1411, 3 months ago

write an algorithm program for
1. Read an array and count even and odd numbers
2. Read an array and print "Prime" if the element is
prime and print "Not Prime" if not
3. Linear Search of the element in an array.​

Answers

Answered by KumariVaishnavi17
0

Given an array A[], write a function that segregates even and odd numbers. The functions should put all even numbers first, and then odd numbers.

Example:

Input = {12, 34, 45, 9, 8, 90, 3}

Output = {12, 34, 8, 90, 45, 9, 3}

Input = {6, 4, 6, 8, 1, 1, 1}

Output = {6, 4, 6, 8, 1, 1, 1}

Similar questions