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 char in c?
Do pointers store the address of value or the actual value of a variable?
Which of the following sorts is quickest when sorting the following set: 1 2 3 5 4 1) Quick Sort 2) Bubble Sort 3) Merge Sort
Juxtapose the use of override with new. What is shadowing?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
wt is d full form of c
I came across some code that puts a (void) cast before each call to printf. Why?
What is sizeof int in c?
how to make c program without a libary? e.g.#include<stdio.h> libary is not in c progaram.
what is meant by the "equivalence of pointers and arrays" in C?
write the program for maximum of the following numbers? 122,198,290,71,143,325,98
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }