program to check even and odd numbersint


Program to check even and odd numbers:

int main()

{

                int  your_number;

                cout << "Enter a whole number: ";

                cin >> your_number;

 

                if (your_number % 2 == 0)

                   cout << "Your number is even\n";

                else

        {

                  cout << "Your number is odd.\n";

                }

cout << "That's all!\n";

return 0;

}

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: program to check even and odd numbersint
Reference No:- TGS0174804

Expected delivery within 24 Hours