C Program Display and Count Odd Numbers in Array

C Program Display and Count Odd Numbers in Array /* C Program to display and count all odd numbers in array www.EasyCodeBook.com */ #include <stdio.h> int main() { int array[100],i,n, count=0; printf(“Enter number of elements in array = “); scanf(“%d”, &n); printf(“Enter %d numbers in array\n”, n); for (i = 0; i < n; i++)… Read More »

Loading

C Program Find Sum of Even Numbers in Array

C Program Find Sum of Even Numbers in Array /* C Program to Find Sum of Even numbers in array www.EasyCodeBook.com */ #include <stdio.h> int main() { int array[100],i,n, sum=0; printf(“Enter number of elements in array = “); scanf(“%d”, &n); printf(“Enter %d numbers in array\n”, n); for (i = 0; i < n; i++) {… Read More »

Loading

C Program Count Frequency of Each Element in Array

C Program Count Frequency of Each Element in Array This C Program will Find Number of Occurences of Every Element in Array. /* C Program to Count frequencies of each element of an array of numbers www.EasyCodeBook.com */ #include <stdio.h> int main() { int array[100], array2[100], n, i, j, element, count;; printf(“Enter number of elements… Read More »

Loading

C Program Sum of Main Diagonal of Square Matrix

C Program Sum of Main Diagonal of Square Matrix   /* Write a C program to input a Square matrix of m rows and m columns and displaying the sum of the main diagonal elements from top left corner to right bottom corner. www.easycodebook.com */ #include <stdio.h> int main() { int sqmatrix[10][10]; int i,j,m,sum=0; printf(“The… Read More »

Loading