C program to count even and odd elements in array

Write a C program to input elements in array from user and count even and odd elements in array. How to find total number of even and odd elements in a given array using C programming. Logic to count even and odd elements in array using loops.

Example

Input

Input array: 1 2 3 4 5 6 7 8 9

Output

Total even elements: 4
Total odd elements: 5

Read more

C program to print circle box number pattern with 1 and 0

Write a C program to print the given circle number pattern with 1’s and 0’s. How to print circle number pattern of one’s and zero’s using for loop in C programming. Logic to print the box number pattern with 1 as border and 0 in center and corners.

Example

Input

Input rows: 5
Input cols: 5

Output

01110
10001
10001
10001
01110

Read more

C program to print heart star pattern with name in center

Write a C program to print heart star pattern with name in the center. How to print heart star pattern with the name in center using for loop in C programming. Program to print the below heart star pattern.

Read more

Number pattern programs in C

Number pattern is a series of numbers arranged in specific order. These patterns are patterns created by numbers and are similar to star patterns. They are best suited to enhance your logical thinking abilities and to practice flow control statements. I have assembled a list of number patterns to practice for both novice as well … Read more

Number pattern 35 in C

Write a C program to print the given number pattern using loop. How to print the given number pattern using for loop in C programming. Logic to print the given number pattern using loop in C program.

Example

Input

Input N: 5

Output

Read more