Computer Science, asked by mastanshareef9511, 1 year ago

Write a program input a matrix of size 3×4 and find all even no in it

Answers

Answered by Cheemaking
0

This C Program finds frequency of odd & even numbers in the given matrix. The program first accepts the matrix. Then finds the odd and even numbers in a matrix. Then finds the occurrence of odd and even numbers in a given matrix.

Answered by sswaraj04
1

Answer:

#include <stdio.h>

int main()

{

   int arr[3][4];

   int i,j;

   for(i=0;i<3;i++)

   {

       for(j=0;j<4;j++)

       {

           printf("Enter %dth row and %dth coloumn value",i+1,j+1);

           scanf("%d",&arr[i][j]);

       }

   }

   for(i=0;i<3;i++)

   {

       for(j=0;j<4;j++)

       {

           if(arr[i][j]%2==0)

           printf("%d is an even number\n",arr[i][j]);

       }

   }

   return 0;

}

Explanation:

Hope it helps :-)

Similar questions