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
WAP TO ACCEPT THE BASIC SALARY OF EMPLOYEES & CALCULATE NET SALARY #include stdio.h> #include conio.h> void main() { float Basi
defining software crisis As the technology changes rapidly the requirement for the users' change, to part the growing demand of the user for trade, business, and personal
basic salary of an employe.the allowence are House rent 20% of basic salary Medical allowence is 10% of basic salary conveyence allowence is 10% calculate anrd display gross salar
1. When developing this project in a Win32 Console Applications that includes the precompiled headers, enter in the Name: box, PRJ2[Your Full Last Name][Your First Initial] with no
Purpose This assignment is an exercise in implementing the queue ADT using a singly-linked list. This assignment also introduces the concept of templates. Assignment Th
Write a function that calculates the number of elapsed days between two dates. For example the days between Feb 3, 1970 and June 21, 1980? Becareful for the Leap year
Give the program
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 palindromes
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
question c
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: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd