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 |
What is structure in c explain with example?
What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.
code for copying two strings with out strcpy() function.
wtite a program that will multiply two integers in recursion function
When the macros gets expanded?
When should the volatile modifier be used?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
what will be the output of" printf("%d%d",scanf("%d% d",&a&b));"
How to add two numbers without using semicolon at runtime
A stack can be implemented only using array?if not what is used?
What are the types of type specifiers?
If I have a char * variable pointing to the name of a function ..