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
What does the format %10.2 mean when included in a printf statement?
Disadvantages of C language.
What do mean by network ?
What is #ifdef ? What is its application?
Why does everyone say not to use gets?
What are identifiers c?
Can we use visual studio for c?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
code for find determinent of amatrix
what is event driven software and what is procedural driven software?
What is the difference between mpi and openmp?
How do you print an address?
What are pointers? What are different types of pointers?
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
What is omp_num_threads?