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
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
Explain how to reverse singly link list.
Explain 'far' and 'near' pointers in c.
Does sprintf put null character?
Why c is procedure oriented?
How would you rename a function in C?
Why is a semicolon (;) put at the end of every program statement?
What are the 4 types of unions?
What is an example of structure?
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
What is data type long in c?
Does c have function or method?
What is c definition?
Write a program to print factorial of given number using recursion?