Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
C Program for EVEN & ODD NO IN ANY MATRICES
#include stdio.h>
#include conio.h>
void main()
{
int a[100][100];
int i=0,j=0,r,c,even=0,odd=0;
clrscr();
for(i=0;i<100;i++)
for(j=0;j<100;j++)
a[i][j]=0;
}
i=0; j=0;
printf("\nENTER THE NO OF ROWS: ");
scanf("%d",&r);
printf("\nENTER THE NO OF COLS: ");
scanf("%d",&c);
for(i=0;i { for(j=0;j { printf("\nENTER THE ELEMENTS: "); scanf("%d",&a[i][j]); } } for(i=0;i { for(j=0;j { printf("%d ",a[i][j]); if(a[i][j]%2==0) even++; else odd++; } printf("\n"); } printf("\nTHE EVEN NO ARE %d",even); printf("\nTHE ODD NO ARE %d",odd); getch(); } OUTPUT : ENTER THE NO OF ROWS : 2 ENTER THE NO OF COLS : 2 ENTER THE ELEMENTS : 1 ENTER THE ELEMENTS : 5 ENTER THE ELEMENTS : 3 ENTER THE ELEMENTS : 4 1 5 3 4 THE EVEN NO ARE: 1 THE ODD NO ARE: 3
for(j=0;j { printf("\nENTER THE ELEMENTS: "); scanf("%d",&a[i][j]); } } for(i=0;i { for(j=0;j { printf("%d ",a[i][j]); if(a[i][j]%2==0) even++; else odd++; } printf("\n"); } printf("\nTHE EVEN NO ARE %d",even); printf("\nTHE ODD NO ARE %d",odd); getch(); } OUTPUT : ENTER THE NO OF ROWS : 2 ENTER THE NO OF COLS : 2 ENTER THE ELEMENTS : 1 ENTER THE ELEMENTS : 5 ENTER THE ELEMENTS : 3 ENTER THE ELEMENTS : 4 1 5 3 4 THE EVEN NO ARE: 1 THE ODD NO ARE: 3
printf("\nENTER THE ELEMENTS: ");
scanf("%d",&a[i][j]);
for(i=0;i { for(j=0;j { printf("%d ",a[i][j]); if(a[i][j]%2==0) even++; else odd++; } printf("\n"); } printf("\nTHE EVEN NO ARE %d",even); printf("\nTHE ODD NO ARE %d",odd); getch(); } OUTPUT : ENTER THE NO OF ROWS : 2 ENTER THE NO OF COLS : 2 ENTER THE ELEMENTS : 1 ENTER THE ELEMENTS : 5 ENTER THE ELEMENTS : 3 ENTER THE ELEMENTS : 4 1 5 3 4 THE EVEN NO ARE: 1 THE ODD NO ARE: 3
for(j=0;j { printf("%d ",a[i][j]); if(a[i][j]%2==0) even++; else odd++; } printf("\n"); } printf("\nTHE EVEN NO ARE %d",even); printf("\nTHE ODD NO ARE %d",odd); getch(); } OUTPUT : ENTER THE NO OF ROWS : 2 ENTER THE NO OF COLS : 2 ENTER THE ELEMENTS : 1 ENTER THE ELEMENTS : 5 ENTER THE ELEMENTS : 3 ENTER THE ELEMENTS : 4 1 5 3 4 THE EVEN NO ARE: 1 THE ODD NO ARE: 3
printf("%d ",a[i][j]);
if(a[i][j]%2==0)
even++;
else
odd++;
printf("\n");
printf("\nTHE EVEN NO ARE %d",even);
printf("\nTHE ODD NO ARE %d",odd);
getch();
OUTPUT :
ENTER THE NO OF ROWS : 2
ENTER THE NO OF COLS : 2
ENTER THE ELEMENTS : 1
ENTER THE ELEMENTS : 5
ENTER THE ELEMENTS : 3
ENTER THE ELEMENTS : 4
1 5
3 4
THE EVEN NO ARE: 1
THE ODD NO ARE: 3
I want to change C++ code to Python extension Project Description: I have the C++ source code for an executable that takes a path to an image file as the input and prints tex
Project Description: LOOKING TO DEVELOP A ONLINE POKER Web Application. WEBSITE WILL BE DEVELOPED OVER THE NEXT 6 MONTHS Duration & WILL REQUIRE FULL SOFTWARE CODING OF WEB
Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b
write a program to find the area under the curve y=f(x) between x=a & x=b
Write a program that takes the image tracks.jpg and finds Canny edges, and then finds lines in these edges using the Hough transform. The easiest way to do this is to take the prog
Receive 3 numbers and display them in ascending order from smallest to largest ed#
Describe Processing an array? The Single operations which involve complete arrays are not permitted in C language. therefore if a and b are similar arrays (for example same dim
how to avoid duplicates strings in an array
A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome
keypad
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd