Write a program using two-dimensional array that lists the odd
numbers and even numbers separately in a 12 input values.
Answer Posted / 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 View All Answers
Is null valid for pointers to functions?
What are the 5 elements of structure?
What is logical error?
Write a program to use switch statement.
Tell me what is null pointer in c?
Explain how are 16- and 32-bit numbers stored?
Where register variables are stored in c?
What is keyword in c?
What are global variables and explain how do you declare them?
What is typedf?
What is the most efficient way to count the number of bits which are set in an integer?
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
how to find anagram without using string functions using only loops in c programming
What do you mean by dynamic memory allocation in c?
what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above