Untitled
public text v1 · immutable#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();
}