Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

c program to input values in a table(using 2D array) and print odd numbers from them

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pointers in c with example?

1024


What does a function declared as pascal do differently?

1044


Where static variables are stored in c?

1044


Describe explain how arrays can be passed to a user defined function

1042


What is meant by inheritance?

1051


Difference between MAC vs. IP Addressing

1100


diff between exptected result and requirement?

1994


What are the types of functions in c?

939


What does do in c?

995


What is the difference between formatted&unformatted i/o functions?

1011


Why c is called top down?

1095


write a program to find the given number is prime or not

4662


Write a program to check prime number in c programming?

1031


Explain two-dimensional array.

1013


Is main a keyword in c?

1086