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

Is swift based on c?

0 Answers  


Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)

0 Answers  


What are types of functions?

0 Answers  


what is the difference between while and do while?

2 Answers  


how to go with this?

1 Answers   Wipro,






what do structure language means?

3 Answers   Microsoft,


What are logical errors and how does it differ from syntax errors?

0 Answers  


#include<string.h> void main() { String s1[]={"swathi"}; string s2[]={"maddimsetti"}; s1[]=s[]; printf("%s",s1[]); }

3 Answers   IBM,


write a pgm to print 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1

3 Answers  


What is the meaning of typedef struct in c?

0 Answers  


what is the height of tree if leaf node is at level 3. please explain

0 Answers  


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

0 Answers  


Categories