c program to input values in a table(using 2D array) and print odd numbers from them
Answer / ashu
void main()
{
int a[10][10],i,j,n;
clrscr();
printf("enter the no. of elements:");
scanf("%d",&n);
printf("Enter the elements:");
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
scanf("%d",&a[i][j]);
}
}
printf("Odd no.:");
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
if(a[i][j]%2==0)
{
printf(" ");
}
else
{
printf(" %d",a[i][j]);
}
}
}
getch();
}
Is This Answer Correct ? | 7 Yes | 1 No |
Is c procedural or object oriented?
Why main is not a keyword in c?
Compare interpreters and compilers.
Is flag a keyword in c?
enum day = { jan = 1 ,feb=4, april, may} what is the value of may? a)4 b)5 c)6 d)11 e)none of the above
What is p in text message?
How can I dynamically allocate arrays?
What is #line in c?
How can I send mail from within a c program?
write a program to insert an element at the specified position in the given array in c language
WHAT IS HEADER?
what is the code to display color fonts in the output?