answersLogoWhite

0


Best Answer

HERE IS IT!!!!!

#include

#include

void main()

{

int a[12],b[12],c[12],i,j=0,k=0;

clrscr();

printf("Enter an integer\n");

for(i=0;i<1;i++)

{

scanf("%d",&a[i]);

}

for(i=0;i<1;i++)

{

if((a[i]%2)==0)

{

b[j]=a[i];

j++;

}

else

{

c[k]=a[i];

k++;

}

}

printf("This number below is even:\n\n");

for(i=0;i

{

printf("%d\n",b[i]);

}

printf("This number below is odd:\n\n");

for(i=0;i

{

printf("%d\n",c[i]);

}

getch();

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Create a program that will ask the user to input an integer and display all odd numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which program do you create a graph?

You can use MS Excel to create a graph from data in the spreadsheet or from an external source. You also can display a graph with MS Powerpoint. MS Word can display a graph, but usually does not create it.


Is Html an example of an HTML program?

HTML is not a program it is a langue your computer speaks with the browser to create arguments and display data


HOW TO SOLVE 'C' problem?

1. write a 'c' program to read 4(four)numbers from a file 'BANK' and calculate the average of the numbers.Now print the calculated average in another output file 'AVERAGE' 2. write a 'c' program that finds the sum and average of inputted five integer numbers of the array using dynamic memory allocation function malloc(). 3. write a 'c' program to create simple elements 1,2,3,4 in the link list of 4(four)nodes and display the list's elements. 4. write a 'c' program to convert the expression (A+B)/(C+D) into postfix expression into stack.and then evaluate it for A=10,B=20,C=15,D=5 and display the stack status after each operation. 5. write a 'c' programto create a linked list implemented on an array containing the following numbers:1,2,3,3,3,4,4,9 and pack it to remove the duplicate numbers.so that only the following data are contained by the nodes:1,2,3,4,9


How do you create program that display your name?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { clrscr(); printf("Your name here"); getch(); }


How do you create a program that will display output?

It must use a function with a "return" statement. Or you could output via console. (.NET CODE(C#)) Console.WriteLine("Output.");


Write a line of code that will create the variable X in memory The data type of X should only hold whole numbers?

Dim Int_NumberHolder as Integer Int_NumberHolder = 3


Create a flowchart that will display my name?

ana


How do you create a mirror image of letters and numbers on a Windows program?

1 2 3 4 5 6 7 8 9


How do you create a program that will add 2 numbers?

first you make 3 integer variables. lets called them sum1, num1 and num2 then you get user imput that will assign num1 and num2 with values or make a statment giving them valvues such as num1=5 num2=3 then you make a statement that assigns sum1 a valvue, sum1=num1 + num2 Thats it.


What are set of numbers that create a product?

All numbers can create products.


Create a program that will display the sum of all numbers from 1 up to the input number?

to print the sum of first ten numbers:- void main() {int i,sum; sum=0; while(i&lt;=10) sum=sum+i; i=i+1; } printf("The sum is : %d",sum); }


How do you create an equivilent fraction?

Multiply the numerator and the denominator by the same integer.