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 |
How to find a missed value, if you want to store 100 values in a 99 sized array?
what are bit fields? What is the use of bit fields in a structure declaration?
0 Answers Flextronics, TISL, Virtusa,
Which is better malloc or calloc?
What is a pragma?
Write a code to reverse string seperated by spaces i/p str=India is my country o/p str=aidnI si ym yrtnuoc After writing code, optimize the code
AMMONG THE 4 STROAGE CLASSES IN C, WHICH ONE FASTEST?
how many times of error occur in C
what is the self-referential structure?
What is the use of parallelize in spark?
Explain how do you declare an array that will hold more than 64kb of data?
sir, i cannot find the way how to write aprogram by using array on queue
Why doesnt long int work?