Write a program using two-dimensional array that lists the odd
numbers and even numbers separately in a 12 input values.
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 |
what is a far pointer
12 Answers ABB, DRDO, ITI, Maruti Suzuki, Steel Plant, TCS, Toyota, Vivo Mobiles,
How can we allocate array or structure bigger than 64kb?
Once I have used freopen, how can I get the original stdout (or stdin) back?
How to write a program to receive an integer & find its octal equivalent by using for loop?
wt is diference between int and int pointer as same as float and float pointer and char and char pointer
What is scope rule in c?
hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell
Do you know the purpose of 'register' keyword?
What are comments and how do you insert it in a C program?
What does c value mean?
When do you say that a digraph is acyclic A)if and only if its first search does not have back arcs B)a digraph is acyclic if and only if its first search does not have back vertices C)if and only if its first search does not have same dfnumber D)None of these
any "C" function by default returns an a) int value b) float value c) char value d) a & b