// Diplaying Even and Odd Numbers from array
// Programmer name: Sohail Ahmed
// Dated: 16/05/2011
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
int List[10]={3,7,6,1,2,5,4,9,8,10};
void main()
{
clrscr();
for(int count=0; count<=9; count++)
{
if(List[count]%2==0)
{
cout<<"\nEven numbers: "<<List[count]<<" ";
}
else
{
cout<<"\nOdd Numbers: "<<List[count]<<" ";
}
}
getch();
}
0 comments:
Post a Comment