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
Explain enumerated types.
What is nested structure with example?
Can 'this' pointer by used in the constructor?
What is typedef example?
Which header file should you include if you are to develop a function which can accept variable number of arguments?
Write a program to find factorial of a number using recursive function.
Explain what is the difference between the expression '++a' and 'a++'?
What is difference between scanf and gets?
What are data structures in c and how to use them?
What is a nested loop?
How to define structures? ·
What is the difference between null pointer and wild pointer?
The __________ attribute is used to announce variables based on definitions of columns in a table?
Is fortran still used in 2018?
Why calloc is better than malloc?