Notice: Undefined offset: 226996 in /var/www/html/qa-external/qa-external-users.php on line 744
a c++ program to determine whether a number is even or odd - OnlineGDB Q&A
Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

a c++ program to determine whether a number is even or odd

0 votes
asked Sep 26, 2018 by (230 points)

1 Answer

0 votes
answered Sep 27, 2018 by hakfelix90@gmail.com
include<iostream>

using namespace std;

int main()

{

int number;

cout<<"enter a number to check"<<endl;

cin>>number;

if (number%2=0);

cout<<"it is even"<<endl;

else

cout<<"it is odd"<<endl;

return 0;
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...