# Odd and Even Number Checker Using Array in Perl

Apr 16, 2020

I wrote this program using Perl programming language that will ask the user the size on an array to be processed and then it will ask also to give a series of numbers. Then the program will display the list of odd and even numbers based on the given numbers by the user.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/https://www.unlimitedbooksph.com/

Program Listing

```# odd_even_array.pl
# Author   : Jake R. Pomperada,MAED-IT,MIT
# Date     : April 11, 2020   Saturday  1:27 PM
# Location : Bacolod City, Negros Occidental

@\$values=(1..20);

\$a=0,\$r=0,\$data=0;

printf("\n");
printf("\t\tOdd and Even Number Checker Using Array in Perl");
printf("\n\n");
printf("\tEnter The Array Size : ");
chomp(\$num_input=<STDIN>);
printf("\n");
for(\$a=0; \$a<\$num_input; \$a++)
{
printf("\tEnter Array Elements Item No. %d: ",\$a+1);
chomp(\$values[\$a]=<STDIN>);

}
printf("\n\n");
printf("\tList of Odd Numbers : ");
printf("\n\n");
for (\$a=0; \$a<\$num_input; \$a++) {
\$r = \$values[\$a] % 2;
if (\$r != 0) {
printf("\t %d ",\$values[\$a]);
}
}

printf("\n\n");
printf("\tList of Even Numbers : ");
printf("\n\n");
for (\$a=0; \$a<\$num_input; \$a++) {
\$r = \$values[\$a] % 2;
if (\$r == 0) {
printf("\t %d ",\$values[\$a]);
}
}
printf("\n\n");
printf("\tEnd of Program");
printf("\n\n");
```