Write a program using two-dimensional array that lists the odd
numbers and even numbers separately in a 12 input values.



Write a program using two-dimensional array that lists the odd numbers and even numbers separately..

Answer / jeeva

#include<stdio.h>
#include<conio.h>
void main()
{
int a[20][20],k,n=20;
printf("enter the number of value");
scanf("%d",&n);
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
scanf("%d",&a[i][j]);
}}
if(i%2==0)
{
printf("the number is even");
}
else
{
printf("the number is odd");
}}
if(j%2==0)
{
printf("the number is even");
}
else
{
printf("the number is odd");
}
k=0;
k=k+a[i][j];
printf("%d",k);
}
gerch();
}

Is This Answer Correct ?    29 Yes 43 No

Post New Answer

More C Interview Questions

What are the ways to a null pointer can use in c programming language?

0 Answers  


How do i store a paragraph into a string? for example, if i input a long paragraph, the program will read the words one by one and concatenate them until no word is left.

1 Answers  


Explain what is the difference between null and nul?

0 Answers  


what is the difference between auto and static keywords

1 Answers   cDot, College School Exams Tests, TCS,


How can a number be converted to a string?

1 Answers  


What is the use of #define preprocessor in c?

0 Answers  


What is the purpose of void in c?

0 Answers  


What is a null pointer in c?

0 Answers  


difference between memcpy and strcpy

1 Answers  


write an algorithm to display a square matrix.

0 Answers  


WHAT IS FLOAT?

3 Answers  


Is c pass by value or reference?

0 Answers  


Categories