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
What are the salient features of c languages?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
Does c have an equivalent to pascals with statement?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
What are high level languages like C and FORTRAN also known as?
What is omp_num_threads?
Is the exit() function same as the return statement? Explain.
How to throw some light on the b tree?
How is a pointer variable declared?
Which is more efficient, a switch statement or an if else chain?
What is pre-emptive data structure and explain it with example?
Explain do array subscripts always start with zero?
What is the use of in c?
What is getche() function?
How does #define work?