All pastes #443595 Raw Edit

Unnamed

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

#include <conio.h>

int main()
 {
   int iNum = 0 , //Number being inputted
       iRem = 0 ;  //Remainder after (iNum%2)
      cout <<"Input your number " ;
      cin >>iNum ;

      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 if (iRem=0)          //so it can say it's even
      {
      cout << "The number is even." ;
      }
      getch()  ;
      }