answersLogoWhite

0

#include <iostream>

int main()

{

int num;

std::cout << "Enter a number: ";

std::cin >> num;

if(num % 2 == 0)

{

std::cout << "Number is even";

}

else

{

std::cout << "Number is odd";

}

return 0;

}

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
MaxineMaxine
I respect you enough to keep it real.
Chat with Maxine
JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan

Add your answer:

Earn +20 pts
Q: Even or odd in c plus plus program?
Write your answer...
Submit
Still have questions?
magnify glass
imp