All pastes #443687 Raw Edit

Untitled

public text v1 · immutable
·published 2007-04-16 22:41 UTC
rendered paste body
#include <iostream.h>

#include <conio.h>

int main()
 {
   int iNum;
   int iRem;
   cout <<"Input your number " ;
   cin >>iNum ;
   cin.ignore();

   iRem = iNum%2;  //does the calculation

   cout<<iRem <<endl; //this is just to show the number to error check

   if (iRem==1)          //so it can say it's odd
   {
    cout << "The number is odd." ;
   }

   else          //so it can say it's even
   {
    cout << "The number is even." ;
   }

  cin.ignore();

 }