Subscribe For Free Updates!

We'll not spam mate! We promise.

Sunday 26 August 2012

C++ code to Diplaying Even and Odd Numbers from array


// 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();
}

Socializer Widget By CodingLovers
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

0 comments:

Post a Comment