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