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 are the ways to a null pointer can use in c programming language?
How do i store a paragraph into a string? for example, if i input a long paragraph, the program will read the words one by one and concatenate them until no word is left.
Explain what is the difference between null and nul?
what is the difference between auto and static keywords
1 Answers cDot, College School Exams Tests, TCS,
How can a number be converted to a string?
What is the use of #define preprocessor in c?
What is the purpose of void in c?
What is a null pointer in c?
difference between memcpy and strcpy
write an algorithm to display a square matrix.
WHAT IS FLOAT?
Is c pass by value or reference?