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 |
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
What is the memory allocated by the following definition ? int (*x)();
Does sprintf put null character?
wat s the meaning of (int *)p +4;
What are the types of macro formats?
What is the purpose of realloc()?
Write a program to generate prime factors of a given integer?
What is external variable in c?
How a string is stored in c?
There are 3 baskets of fruits with worng lables,one basket has apple,another basket has orange,another has combination of apple and orange,what is the least way of interchange the lables.
15 Answers Cisco, Google, MBT,