Wednesday, 18 December 2013

Even or Odd For 1 to 100 Number Using C++


#include<iostream.h>
#include<conio.h>
void main()
{
  int  i;
  for(i=1;i<=100;i++)
  {
  if(i%2==0)
  {
                  cout<<i<<"  number is even \n “;
   }
  else
  {
                 cout<<i<<"   number is odd\n“;
  }
}
  getch();

}

No comments:

Post a Comment