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...

Design a program using an array that lists even numbers and
odd numbers separately from the 12 numbers supplied by a user.

Answer Posted / valli

main()
{
int a[12],j;
printf("enter 12 numbers");
for(i=0;i<12;i++)
scanf("%d",&a[i]);
printf("even numbers\n");
for(i=0;i<n;i++)
if(a[i]%2==0)
printf("%d ",a[i]);
printf("odd numbers\n");
for(i=0;i<12;i++)
if(a[i]%2)
printf("%d ");
}
printf("%d ",a[i]);

Is This Answer Correct ?    15 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you convert strings to numbers in C?

1213


What is c language used for?

967


What is unary operator?

1094


How can I sort more data than will fit in memory?

1087


Stimulate calculator using Switch-case-default statement for two numbers

2967


how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....

1781


What is union and structure?

1103


A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

1223


What is a newline escape sequence?

1090


how to find binary of number?

4417


What is the 'named constructor idiom'?

1071


What are runtime error?

1116


Why do we use header files in c?

1057


What is break statement?

1109


To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9

2630